- Upsert a PickupDelivery by business id for a given TransportRequest
Upsert PickupDelivery information. When if-match is not specified, then no optimistic protection is applied, ie: the last update wins.
Note: It is not possible to update pickupDeliveries within TransportRequests directly through the Upsert a PickupDelivery by business Id endpoint.
The RFC7240 Prefer header indicates that a particular server behavior is preferred by the client but is not required for successful completion of the request (see RFC 7240).
The following behavior is supported by this API:
- return=<minimal|representation> is used to suggest the server to return using status code 204 without a resource in the response body (minimal) or using status codes 200 or 201 with the resource in the response body on success (representation).
Properties specific to the activity that needs to be executed for fulfilling this order. In case of a PickupDelivery Order, these are two separate activities with their own settings.
- Mock serverhttps://developer.conundra.eu/_mock/apis/order-book/order-book-api/transport-requests/{business_id}/orders/pickup-deliveries/{order_id}
- Order Book API Productionhttps://api.conundra.eu/orderbook/v1/transport-requests/{business_id}/orders/pickup-deliveries/{order_id}
curl -i -X PUT \
'https://developer.conundra.eu/_mock/apis/order-book/order-book-api/transport-requests/{business_id}/orders/pickup-deliveries/{order_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'If-Match: string' \
-H 'Prefer: string' \
-d '{
"order": {
"order_category": "orderCategoryA",
"description": "a description",
"capacities": [
{
"type": "volume",
"value": 20
}
],
"mandatory": true,
"requirements": {
"tags": [
"tagX"
],
"forbidden_tags": [
"tagY"
],
"combination_strategy": "COMBINE"
},
"lifo_groups": [
"lifo_group"
],
"outsourcing_cost": 0,
"custom_data": {
"shop_manager": "John Smith"
},
"plan_group": "a plan group",
"client": "companyId",
"max_time_in_vehicle": {
"max_time": "PT8H",
"penalty": 1000
}
},
"pickup": {
"site_location": {
"location_id": "locationA"
},
"stop_time": {
"value": "PT5M",
"combination_strategy": "HIGHEST"
},
"service_time": "PT5M",
"sequence": 1,
"time_frame": {
"absolute": [
{
"start_at": "2021-01-01T10:15:30Z",
"end_at": "2021-01-01T11:15:30Z",
"cost": 42
}
],
"windowed": [
{
"start_at": "2021-01-01T10:15:30Z",
"end_at": "2021-01-01T11:15:30Z"
}
]
},
"color": "red",
"labels": [
"labelA"
],
"custom_data": {
"shop_manager": "John Smith"
}
},
"delivery": {
"site_location": {
"location_id": "locationB"
},
"stop_time": {
"value": "PT10M",
"combination_strategy": "HIGHEST"
},
"service_time": "PT10M",
"sequence": 2,
"time_frame": {
"absolute": [
{
"start_at": "2021-01-01T14:15:30Z",
"end_at": "2021-01-01T15:15:30Z",
"cost": 42
}
],
"windowed": [
{
"start_at": "2021-01-01T14:15:30Z",
"end_at": "2021-01-01T15:15:30Z"
}
]
},
"color": "blue",
"labels": [
"labelB"
],
"custom_data": {
"delivery_notes": "Handle with care"
}
}
}'PickupDelivery updated
Response body contains updated PickupDelivery
General order properties. In case of a pickupDelivery Order, these properties are shared between both the pickup and delivery activities.
Properties specific to the activity that needs to be executed for fulfilling this order. In case of a PickupDelivery Order, these are two separate activities with their own settings.
{ "order": { "business_id": "orderA", "order_category": "orderCategoryA", "description": "a description", "capacities": [ … ], "mandatory": true, "requirements": { … }, "lifo_groups": [ … ], "outsourcing_cost": 0, "custom_data": { … }, "plan_group": "a plan group", "max_time_in_vehicle": { … }, "client": "companyId" }, "delivery": { "site_location": { … }, "visit_location": { … }, "stop_time": { … }, "service_time": "PT5M", "sequence": 1, "time_frame": { … }, "color": "red", "labels": [ … ], "custom_data": { … } }, "pickup": { "site_location": { … }, "visit_location": { … }, "stop_time": { … }, "service_time": "PT5M", "sequence": 1, "time_frame": { … }, "color": "red", "labels": [ … ], "custom_data": { … } } }