Skip to content

Upsert a Pickup by business Id

Request

Create or update a Pickup Order.

This endpoint allows you to update (default behaviour) or insert a Pickup Order. The caller is responsible for providing a unique business identifier for each Order, regardless of order type. If this business identifier can't be found, a new order will be created. If a Pickup order with the given business identifier can be found then it will be updated.

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

The business identifier of an entity instance

Headers
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
pickupobject(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 pickup 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": { … } }, "pickup": { "site_location": { … }, "stop_time": { … }, "service_time": "PT5M", "sequence": 1, "time_frame": { … }, "color": "red", "labels": [ … ], "custom_data": { … } } }

Responses

Order created or updated.

Headers
Preference-Appliedstring

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

Locationstring

contains the URI to the entity

Bodyapplication/json
orderobject(OrderInformation)required
pickupobject(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", "client": "companyId", "max_time_in_vehicle": { … } }, "pickup": { "site_location": { … }, "visit_location": { … }, "stop_time": { … }, "service_time": "PT5M", "sequence": 1, "time_frame": { … }, "color": "red", "labels": [ … ], "custom_data": { … } } }