Creates a shipment plan
Creates a new shipment plan. A shipment plan is a structure that holds information about a recurring shipment. Like a shipment, a shipment plan also consists of segments each representing a part of the logistics journey. A segment spans from a location to another and each segment may be assigned a different tracking device. The segments of the shipment must form a continuous chain of locations, that is the origin of a segment must match the destination of a previous segment.
In addition to shipments, a predefined duration can be assigned to each segment in the plan. This information will be used to calculate the Estimated Time of Departure (ETD) and Estimated Time of Arrival (ETA) when instantiating a shipment from a shipment plan.
Request body
Example request
{
"autoStart": true,
"description": "A shipment consisting of four segments",
"name": "From Portugal to Panama",
"segments": [
{
"description": "From factory to port",
"destination": "LOC-7b6b15cc-2307-4875-9f66-99deb5227e92",
"durationS": 10800,
"name": "Truck transport",
"origin": "LOC-54531862-f87a-4b70-99a4-0e8224a56be4",
"trackingId": "HERE-540bb24b-0d57-4f8c-aeaf-6c91cd0aff8d",
"transportMode": "truck"
},
{
"description": "From port to another port",
"destination": "LOC-a2dc2c70-cc3e-4fa5-ac77-4c63558e7f97",
"durationS": 129600,
"name": "Marine transport",
"origin": "LOC-7b6b15cc-2307-4875-9f66-99deb5227e92",
"trackingId": "VRTR-8b9fd950-ce19-4aaf-98d5-840a76652658",
"transportMode": "sea"
},
{
"description": "From port to storage",
"destination": "LOC-733deb91-efa3-41b6-9003-92845866b511",
"durationS": 7200,
"name": "Truck transport",
"origin": "LOC-a2dc2c70-cc3e-4fa5-ac77-4c63558e7f97",
"trackingId": "HERE-540bb24b-0d57-4f8c-aeaf-6c91cd0aff8d",
"transportMode": "truck"
}
],
"subShipment": false
}Response
Created.
The shipment plan has been successfully created.
Example response
{
"shipmentPlanId": "SHPP-de2bd93d-a371-4e22-801a-528238d1a33a"
}