Create a new order
Create a new order in the new or in_progress state. An order is the server-side representation of a basket — items, guests, discounts, payments and so on hang off it via the sub-resources documented under /shop/orders/{orderId}/*. The freshly created order is empty: callers typically follow this call with one or more POST /shop/orders/{orderId}/items requests and finally POST /shop/orders/{orderId}/submit to convert the order from a basket into a confirmed sale.
The site_id is required and must be a site the caller has permission to create orders for. If customer_id is provided, the customer is attached to the order immediately — equivalent to a follow-up call to POST /shop/orders/{orderId}/customer. external_ref and external_ids capture identifiers from the calling system (e.g. a PMS reservation reference) so the order can be reconciled later.
Request body
Example request
{
"site_id": "5e932c0901d210625e3a8766",
"customer_id": "5f1a83b9d52d5c2c8b8b4567",
"external_ref": "PMS-12345",
"external_ids": [
{
"key": "pms_id",
"value": "id_abc123"
}
],
"partner_id": "spafinder",
"sales_channel_id": "5f1a83b9d52d5c2c8b8b4569"
}Response
The Order was successfully retrieved