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.
purchase-orders:readGrant 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
- 200
- 401
- 403
- 404
- 429
OK
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.