Change an order
Change an eligible order using its current revision and a stable write key.
orders:write. Send the body as application/merge-patch+json.
Before you send a change:
- Read the order and check each supplied field against
editable_fields. - Send the current
revisioninside double quotation marks inIf-Match. - Send a new
Idempotency-Key. After a timeout, retry with the same key,If-Matchvalue, and body.
editable_fields before each PATCH. A mixed permitted/locked request returns 409 order_not_updateable with field paths in errors and saves nothing. After 412 revision_conflict, read the order again and decide which changes still apply.
Omitted fields keep their values. requested_windows replaces the list of the supplied stop, and file_ids only adds files. Booking details follow the same rules as a new order and can change the price. Code/contact-only changes preserve price and timing.
Read Change or cancel an order for the field rules, an example, and the recovery from each error.Headers
Path Parameters
Body
Order fields to change. Omitted fields keep their current values.
Response
The updated order.
Current state of one transport order.
Fields accepted by PATCH at this transport stage. Pickup and delivery entries use dotted paths. Contact entries permit partial name, phone, and email updates. Empty after primary delivery or cancellation. Other validation and credential scopes still apply.
customer_reference, customer_note, file_ids, items, service_options, pickup.address, pickup.type, pickup.available_from, pickup.requested_windows, delivery.address, delivery.type, delivery.requested_windows, pickup.release_code, pickup.contact, delivery.contact Actions that the current order state permits. The list does not check the scopes of your credential. Use this list to enable controls, and handle rejected writes because the order can change before the request completes.
Operation that the current order state permits. It does not check the scopes of your credential.
update, cancel, get_files, get_inspection_report, get_tracking Drivers with a booking on this order, one entry for each driver and vehicle. Drivers who finished their part stay in the list. A booking can cover only part of the route, and it does not start location tracking. Replace the displayed list each time you read the order.
Text that explains why you cannot cancel or change the order, or null when both actions are available. Show the text as written; its wording can change. An order that returns to accepted after a driver unbooks stays closed.