Add allocation
Allocate a bill line against a PO line (price) and/or a delivery-note line (receipt quantity) on NET. At least one counterpart is required. Enforces the double-allocation guard (Σ matched quantity ≤ ordered). Used both for manual allocation and to confirm a fuzzy suggestion (Method=Fuzzy).
Path Parameters
Body
Allocates a bill line against a purchase-order line (price) and/or a delivery-note line (receipt quantity). At least one counterpart is required.
The bill line being matched.
Quantity to match on this allocation.
The purchase-order line to match against (the price dimension). Optional, but at least one of purchase-order or delivery-note line is required.
The delivery-note line to match against (the receipt-quantity dimension). Optional, but at least one of purchase-order or delivery-note line is required.
Net amount to match. Optional — when omitted the service derives it from the bill line's unit price.
How the match was made. Defaults to Manual; set to Fuzzy when confirming a suggested match (and carry its Confidence).
Manual, Exact, Fuzzy Fuzzy match confidence (0–1) to record, when confirming a suggestion (Method = Fuzzy).
Response
OK
A bill's three-way match: each bill line with its allocations and derived price/quantity variances (computed at read time, never stored), plus fuzzy purchase-order and delivery-note suggestions for lines that still need matching.
Unique identifier of this match group.
The bill under review.
Lifecycle status of the match: Open (nothing to settle), Variance (a flagged difference awaits a human decision), Resolved (settled), or Synced (exported — not reachable yet).
Open, Variance, Resolved, Synced Per-line rounding tolerance, in the bill's currency, that every variance was judged against. Configured per organisation; a difference within tolerance is treated as clean.
True when every line is fully allocated with no outstanding variance.
One entry per bill line, carrying its allocations and derived variances.
Fuzzy purchase-order-line suggestions for bill lines with no exact (SKU) match. Derived, never stored; confirm one (POST an allocation) to create a real match.
Fuzzy delivery-note-line suggestions — the receipt-quantity counterpart of Suggestions. Lets the UI ask 'which delivery does this line belong to?' without the caller knowing line ids.