Shipments
Updates a shipment details
Updates details of a shipment identified by the shipmentId. This is a partial update, meaning that only the provided fields will be updated, except when updating segments, the whole segments will be replaced fully.
Changing the status of the shipment affects the statuses of the segments. The following status changes are allowed:
- pending → ongoing
- changes the status of the first segment to ongoing
- pending → cancelled
- changes the status of all segments to cancelled
- ongoing → cancelled
- cancels the current ongoing segment and all the succeeding segments
- ongoing → completed
- completes the current ongoing segment and cancels all the succeeding segments
Note: segments and autoStart can be updated via this API call only if the shipment is in pending state.
patch/shipments/v4/{shipmentId}
Request body
Example request
{
"segments": [
{
"description": "From factory to port",
"destination": "LOC-7b6b15cc-2307-4875-9f66-99deb5227e92",
"name": "Truck transport",
"origin": "LOC-54531862-f87a-4b70-99a4-0e8224a56be4",
"trackingId": "HERE-540bb24b-0d57-4f8c-aeaf-6c91cd0aff8d",
"transportMode": "truck"
}
]
}Response
Successful (no content)
The shipment information was updated