Baskets

Create a Basket

Creates a new Basket at a Site. The basket is the central object in Trybe's checkout flow — it accumulates items (appointments, area bookings, products, vouchers, memberships, etc.), customer details, coupons, vouchers, and payments before being submitted to create an Order.

If the request is authenticated as a Customer (e.g. via a customer access token), that customer is linked to the basket automatically. Otherwise pass customer_id to associate an existing customer, or omit it and call POST /shop/basket/{basketId}/customer later in the flow.

A "Website" SalesChannel is provisioned for the site's organisation on first use and reused thereafter.

post/shop/basket

Request body

site_idstring uuid required

ID of the Site the basket belongs to. The site determines currency, tax configuration, payment processors, and which offerings are bookable.

customer_idstring uuid

Optionally pre-link an existing Customer to the basket. Ignored unless the customer belongs to the same brand as the site. If the request is authenticated as a customer, the authenticated customer takes precedence.

Example request

{
  "site_id": "9c3ad1e2-2d1b-4f4f-9e07-6d6c4f3a2b1a",
  "customer_id": "5e1e3f6c-2a44-4f6e-8c61-9c1f7d2e1c11"
}

Response

The newly created Basket.

Changes