Orders

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.

post/shop/orders

Request body

site_idstring uuid required

The site the order belongs to. Must be a site the calling user has permission to manage reservations for.

status'new' | 'in_progress'

The initial status of the order. new is the default; use in_progress to flag the order as actively being worked on by a member of staff (this distinction is useful for live dashboards and concurrency reporting).

customer_idstring nullable

Optional ID of the customer to attach to the order at creation time. If omitted, the order starts unassociated and a customer can be attached later via POST /shop/orders/{orderId}/customer.

external_refstring

A free-form reference from the calling system — for example a PMS reservation code. Stored verbatim on the order; not interpreted by Trybe.

partner_idstring nullable

Registered partner that originated this order. Used for reporting and revenue allocation when orders arrive via a third-party booking partner; must match one of the configured PartnerConfig IDs on this organisation.

sales_channel_idstring nullable

The sales channel to attribute the order to. Must reference a sales channel that belongs to the order's organisation.

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

Changes

No recorded changes to this endpoint across all 1 revision of this API.