Skip to main content

Upsert Shipment with Line Items

POST 

/v1/api/integrations/sync/shipment-with-line-items

Creates or updates a shipment along with its line items in a single atomic operation. Follows the same upsert semantics as the POST /v1/api/integrations/sync/shipment endpoint.

Upsert behaviour:

  • If shipment_key is provided and a matching shipment exists, it will be updated
  • Shipment fields are patched — omitting a field preserves the existing value
  • Shipments with status completed are never modified
  • Only type and line_items are required

Line item upsert (line_items):

  • Matched by product_id — if a line item with the same product already exists on this shipment, it will be updated
  • On update, expected_quantity, actual_quantity, line_no, and additional_data are patched
  • name and sku are intentionally not updated — a different name/SKU implies a different product

Pallet identifiers (pallet_identifiers):

  • Any identifiers in the payload are upserted (inserted if new, ignored if already present)
  • If sync_pallet_identifiers: true is provided, any untracked identifiers not in the payload are deleted, syncing the identifier list to the payload. Already-tracked identifiers are always preserved.

Response: Returns the full shipment record including all joined data (line items, pallet identifiers, location, etc.)

Auth Required

Required Permissions:

  • quality.inspection.shipment:write ("Quality Inspection Shipment Write")

Request​

Responses​

Shipment with line items upserted successfully