Skip to main content

Bulk Upsert Shipments with Line Items

POST 

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

Creates or updates multiple shipments with their line items. Each shipment is processed in its own transaction, so a shipment that fails validation does not affect the others in the batch. Follows the same upsert semantics as the single POST /v1/api/integrations/sync/shipment-with-line-items endpoint for each shipment in the array.

Per-shipment outcomes (results):

  • upserted — the shipment and its line items were written
  • partially_updated — a shipment with the same shipment_key is already past pending (in_progress, review or completed), so only the post-inspection fields listed under Updates to shipments past pending were applied
  • failed — the shipment was rejected (e.g. missing type, missing line items, invalid line item); message explains why

sync_pallet_identifiers flag:

  • Provided at the top level and applies to all shipments in the batch
  • When true, any untracked pallet identifiers not present in each shipment's payload are deleted for that shipment. Already-tracked identifiers are always preserved.

Updates to shipments past pending: once an inspection has started, an upsert only applies fields that do not feed or record the inspection: bol_number, pro_number, dock_door (matched to an existing location by name, or created), additional_data (shallow-merged into the existing object), each matched line item's additional_data (matched by product_id + sku). Everything else in the payload (order numbers, supplier, quantities, new or removed line items, pallet_identifiers, sync_pallet_identifiers) is ignored for these shipments.

Response: data contains the full shipment records for every upserted and partially_updated shipment (line items, pallet identifiers, location, etc.), as they exist after the request. failed shipments have no record and appear only in results. results has one entry per shipment in the payload, in request order.

Auth Required

Required Permissions:

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

Request​

Responses​

Batch processed; check results for per-shipment outcomes