Book order
POST/api/v2/orders/{order_id}/book
Books all shipments in an order that are in status draft or booking_failed.
Authorization
Add HTTP header Authorization with the received API key as the bearer token:
- Authorization
- API Key
Parameters
URL parameters
| Property | Type | Description |
|---|---|---|
order_id | string | Order ID Unique identifier for order. uuid |
Request body
- Content-Type
application/json- Body
- BookOrderRequestrequired
| Property | Type | Description |
|---|---|---|
book_order | Object to book an order. | |
| any of | ||
preferred_service_level | string | Preferred service level of shipment. Indicates what carrier, service and/or tags may be used for the booking process. required length 3...80 |
| any of | ||
rate_selections | object | required |
| one of | ||
rate_id | string | Unique identifier for rate. required uuid |
shipment_id | string | Unique identifier for shipment. required uuid |
| one of | ||
rate | object | Custom rate object. Contains information regarding the rate for a shipment that is used to book the shipment.
See custom rate in Shipping flow - Book documentation required |
carrier_code | string | Uppercased code of the carrier in
Wuunder required |
carrier_name | string | Human readable carrier name |
carrier_product_code | string | Uppercased
product/service code for the carrier in Wuunder required |
delivery_after | string | Start of
delivery window |
delivery_before | string | End of
delivery window |
delivery_date | string | Date of expected delivery required |
is_parcelshop_drop_off | boolean | Drop off instead
of pick up |
is_return | boolean | Marks return shipment |
pickup_after | string | Start of pickup
window |
pickup_before | string | End of pickup
window |
pickup_date | string | Date of expected pickup required |
price | integer | The price of a rate in cents. value 1... |
product | string | Product linked to product/service |
purchase_price | integer | The price of a rate in cents. value 1... |
source | string | Internal field, cannot be set. Defaults to 'user' |
tracking | boolean | |
shipment_id | string | Unique identifier for shipment. required uuid |
Request example
Response
Response body
- Content-Type
application/json- Body
| Property | Type | Description |
|---|---|---|
book_order | object | required |
booking_status | string | Indicates the booking process in the system. Note: this does not reflect the state of the order. required one of: scheduled complete in_progress |
order | A collection of shipments. Contains data for orders that are persisted. required | |
rate_selections | object | List of the rates that were selected per shipment for the booking process required |