Three-Way Match
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.
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.
Request
Responses
- 200
Successful response