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 writtenpartially_updated— a shipment with the sameshipment_keyis already pastpending(in_progress,revieworcompleted), so only the post-inspection fields listed under Updates to shipments pastpendingwere appliedfailed— the shipment was rejected (e.g. missingtype, missing line items, invalid line item);messageexplains 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
- 200
- 400
- 401
- 403
- 500
Batch processed; check results for per-shipment outcomes
Bad Request. The request was invalid or cannot be otherwise served.
Unauthorized. User is not authenticated or session is invalid.
Forbidden. User does not have the required permissions.
Internal Server Error