> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dolfinai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Match summaries on bills and line references

> See a bill's three-way match at a glance, tag order and delivery lines with your own references, and read tax rates in a single call.

<Update label="2026-07-21" tags={["Feature","Release"]} description="Match summaries and line references">
  ## Updates

  ### Three-way match summary on bills

  Ask for a bill's match status without a second request. Pass `includeMatch=true` when you [list bills](/api-reference/endpoint/bills/list-bills) or [get a bill](/api-reference/endpoint/bills/get-bill) and each bill carries a `matchSummary` — its three-way match status, plus the purchase orders and delivery notes its confirmed allocations point at, each with its number and your own `externalRef`. Use it to reconcile a matched bill back to your ERP without opening the match group.

  It's off by default because it costs two extra lookups per bill and only means anything for organisations that raise purchase orders. A null `matchSummary` means the bill has no match group at all — the normal state when there was no candidate order — not "unmatched, pending". For per-line variances and match suggestions, fetch the bill's match group instead.

  ### Your own references on order and delivery lines

  Tag individual lines with a reference from your own system. [Purchase order](/api-reference/endpoint/purchase-orders/create-purchase-order) and [delivery note](/api-reference/endpoint/delivery-notes/create-delivery-note) lines now accept an optional `externalRef` on create and update, stored and echoed back verbatim on every response. It's free-form and never used to match a line or identify it — a line is still only ever updated in place by its `id`, so send the id back to edit a line rather than replace it.

  We've also clarified how `sortOrder` behaves on these lines: it's stored exactly as you supply it and never renumbered, and lines come back sorted by it with ties broken by line id.
</Update>
