Skip to main content

Get Three-Way Match Data

GET 

/api/purchase-invoices/:purchaseInvoice/three-way-match

Get three-way match data for an invoice: compares PO quantities/prices, received quantities, and invoice quantities/prices.

Required scope: purchase-orders:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token.

Receipt sources (matches PurchaseOrderLine::getEffectiveReceivedQuantity):

  • Amazon AWD destination POs: receipts come from amazon_awd_ledgers (matched receipts).
  • Amazon FBA destination POs: receipts come from amazon_ledgers (matched receipts).
  • Standard warehouse destinations: receipts come from inbound_shipment_receipt_lines.

Qty match statuses: match, over_invoiced, under_invoiced.

Response fields:

  • lines[]: per-PO-line comparison (po_quantity, received_quantity, invoice_quantity, price_variance, qty_match_status, receipts[]).
  • financial_lines[]: non-product invoice lines (freight, fees, etc.).
  • has_receipts: true if any line has a non-zero received_quantity.

Quantity reconciliation is evaluated at the purchase-order-line level across every invoice and matched vendor credit on the order, adjusted for short-closes and explicit billing settlement — not for this invoice in isolation. A line split across multiple invoices, or offset by a credit, reports qty_match_status = match.

Per-line fields: invoiced_all_quantity (billed across all invoices on the PO), credited_quantity (matched credits on the line), effective_ordered_quantity (ordered, after short-close), net_invoiced_quantity (invoiced − credited), and qty_status_reason (human-readable explanation of the status).

Request

Responses

OK