Skip to content

Upsert a Delivery by business id for a given TransportRequest

Request

Upsert delivery 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 deliveries within TransportRequests directly through the Upsert a Delivery by business Id endpoint.

Security
clientCredentials
Path
business_idstring^[a-zA-Z0-9.~\-_]{1,512}$required

The identifier of the TransportRequest within which this delivery must be added/edited.

order_idstringrequired

The identifier of a delivery instance

Headers
If-Matchstring

weak Etag as optimistic locking check

PreferArray of strings

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).
Bodyapplication/json
orderobject(OrderInformation)required
deliveryobject(TransportInformation)required

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.

Payload

Comprehensive example of a delivery order using site location

{ "order": { "order_category": "orderCategoryA", "description": "a description", "capacities": [ … ], "mandatory": true, "requirements": { … }, "lifo_groups": [ … ], "outsourcing_cost": 0, "custom_data": { … }, "plan_group": "a plan group", "client": "companyId", "max_time_in_vehicle": { … } }, "delivery": { "site_location": { … }, "stop_time": { … }, "service_time": "PT5M", "sequence": 1, "time_frame": { … }, "color": "red", "labels": [ … ], "custom_data": { … } } }

Responses

Order updated

Response body contains updated Order

Headers
ETagstring

weak Etag (ex W/<etag_value>) which contains the (updated) version of the entity

Preference-Appliedstring

to indicate whether a preference has been applied. (ex Preference-Applied: return=representation)

Bodyapplication/json
orderobject(OrderInformationInTransportRequest)required

General order properties. In case of a pickupDelivery Order, these properties are shared between both the pickup and delivery activities.

deliveryobject(TransportInformation)required

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.

Response
{ "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": { … } } }