Skip to main content

List Inbound Shipments for Invoice

GET 

/api/purchase-invoices/:purchaseInvoice/inbound-shipments

List all inbound shipments linked to this purchase invoice — whether created from it or linked to it afterwards. Each shipment also lists every invoice it is linked to under purchase_invoices, since a consolidated shipment is billed once per purchase order it carries.

Required scope: purchase-orders:read

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

Each row also says how it came to be linked to this invoice:

  • linked_via — manual (linked by hand), auto (linked by the shipment matcher because its lines matched this invoice's lines unambiguously), created_from_invoice (the shipment was created from this invoice) or backfill (linked during a data migration)
  • linked_via_label — the same in words
  • linked_by — ID of the user who linked it, or null when nobody chose it
  • linked_at — when the link was made

The response also carries a meta object:

  • has_lines — whether the invoice has any line items
  • is_fully_shipped — whether every invoiced quantity is already covered by a shipment
  • suggested_shipment_ids — IDs of shipments on the purchase order that are not linked to this invoice yet but that the shipment matcher rates exact or partial (see List Linkable Inbound Shipments for Invoice and Auto-Link Inbound Shipments)
  • auto_link_enabled — the account-level purchase_invoice_auto_link_shipments setting: when true, an exact match is linked automatically as invoices and shipments are saved; when false it is only suggested
  • due_date_basis — where the invoice's due date came from, in the same shape as on Get Purchase Invoice; its needs_shipment_link is true when a per-shipment payment term is still waiting for a shipment to be linked

Authentication: Requires Bearer token.

Request​

Responses​

OK