Baskets

Add an item to a Basket

Use this endpoint to add an item to a Basket.

post/shop/basket/{basketId}/items

Request body

discount_amountinteger nullable

Manual discount to apply to this line item, in the smallest currency unit (e.g. pence, cents). Subtracted from the line subtotal before tax. Defaults to 0 / null (no discount).

guest_idsstring[]
offering_idstring object-id

ID of the offering being added to the basket. Required for every offering_type other than free-form vouchers. The format depends on the offering type — practitioner-scheduled offerings use Mongo ObjectIDs.

offering_type'appointment' | 'appointment_enquiry' | 'area_booking' | 'course' | 'hotel_room_reservation' | 'membership' | 'package' | 'product' | 'session' | 'table_reservation' | 'voucher' required

Discriminator describing what kind of sellable item an Offering represents. The value determines which downstream schema (Appointment, Session, Package, etc.) the offering's offering_id resolves against, and which checkout/booking flow applies.

priceinteger

Override price for this line item in the smallest currency unit (e.g. pence, cents). Omit to let the server compute the price from the offering's current price rules.

quantityinteger

Number of units to add to the basket. Defaults to 1.

Example request

{
  "discount_amount": 500,
  "offering_id": "5f1234567890abcdef123456",
  "offering_type": "appointment",
  "price": 4800,
  "quantity": 1
}

Response

Successfully added an item to a Basket.

Changes

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