Skip to main content
POST
Add allocation

Authorizations

x-dolfin-api-key
string
header
required

An API key issued to your client. It carries the client's scope; org-scoped calls also require the x-dolfin-organisation-id header. Keys are created and revoked by a client administrator.

Headers

x-dolfin-organisation-id
string<uuid>

Target organisation. Required when authenticating with an API key; omit for Bearer callers (resolved from the token).

Path Parameters

id
string<uuid>
required

Body

application/json

Allocates a bill line against a purchase-order line (price) and/or a delivery-note line (receipt quantity). At least one counterpart is required.

billLineId
string<uuid>
required

The bill line being matched.

matchedQuantity
required

Quantity to match on this allocation.

poLineId
null | string<uuid>

The purchase-order line to match against (the price dimension). Optional, but at least one of purchase-order or delivery-note line is required.

dnLineId
null | string<uuid>

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.

matchedAmount

Net amount to match. Optional — when omitted the service derives it from the bill line's unit price.

method
enum<string>

How the match was made. Defaults to Manual; set to Fuzzy when confirming a suggested match (and carry its Confidence).

Available options:
Manual,
Exact,
Fuzzy
confidence

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.

id
string<uuid>
required

Unique identifier of this match group.

billId
string<uuid>
required

The bill under review.

status
enum<string>
required

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).

Available options:
Open,
Variance,
Resolved,
Synced
tolerance
required

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.

isClean
boolean
required

True when every line is fully allocated with no outstanding variance.

lines
object[]
required

One entry per bill line, carrying its allocations and derived variances.

suggestions
object[]
required

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.

dnSuggestions
object[]
required

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.