Ga naar hoofdinhoud

Cart

The shopping cart is a resource identified by a cart_id. Typical flow:

  1. Create a cart — you get a cart_id.
  2. Add items (event_id + discount_id + quantity).
  3. Get items to display the current cart.
  4. Delete individual items if the user removes them.
  5. Pass the cart_id to POST /order/create to check out.

Save the cart_id to the user's session so you can retrieve it on subsequent page loads.


Create cart

POST /v1/:client_name/cart/

Creates an empty shopping cart. The Location response header links to the new resource.

Path parameters

NameTypeDescription
client_namestringYour short client name

Response

201 Created

{ "cart_id": "4DSMDACyPo8wLr8vFnTVUR6HzWC5tWGi" }

Put seat(s) in the cart

POST /v1/:client_name/cart/:cart_id

Adds tickets to the cart. The response contains the full cart contents so you don't need to re-query.

Path parameters

NameTypeDescription
client_namestringYour short client name
cart_idstringID of the cart to add to

Request body

FieldTypeDescription
event_idintegerThe sub_event ID
numberofticketsintegerNumber of tickets to add
discount_idstringID of the ticket type (from Ticket types)

Response

200 OK — cart contents (array of items, with a final totalprice element):

[
{
"seat_id": "azL0bNZdD1",
"seat_row_nr": "0",
"seat_nr": "0",
"pmp_name": null,
"event_id": 95,
"event_name": "VoordeMensen Demo Event",
"location_name": "Bellevue Grote Zaal",
"event_date": "01-04-2026",
"event_time": "20:30",
"numberoftickets": 1,
"seat_price": "24.50",
"category_name": "standard",
"discount_id": "2ePdA8q3BN",
"discount_name": "Standard"
},
{ "totalprice": "24.50" }
]

Get items in cart

GET /v1/:client_name/cart/:cart_id

Returns the current contents of the cart.

Path parameters

NameTypeDescription
client_namestringYour short client name
cart_idstringID of the cart

Response

200 OK — same format as the POST response above. Empty cart returns [{"cart": 0}].

Response fields (per item)

FieldTypeDescription
seat_idstringUnique ID for this cart item — needed to delete it
seat_row_nrstringSeat row (non-zero only for reserved-seating events)
seat_nrstringSeat number
pmp_namestring | nullPlace-map part name (if applicable)
event_idintegerSub-event ID
event_namestringEvent name
location_namestringHall / venue
event_datestringDD-MM-YYYY
event_timestringHH:MM
numberofticketsintegerAlways 1 for reserved seating; can be higher for open seating
seat_pricestring (decimal)Final price for this line
category_namestringCategory (rank) name
discount_idstringDiscount used
discount_namestringHuman-readable discount name

Recommendation extension

If the Recommendation Extension is activated for your client, each cart item may include an additional recommand array with suggested other events the user might want to visit before or after this one (including 🚲 cycle-distance between venues). This feature is opt-in per client — ask support to enable.


Delete seat from cart

DELETE /v1/:client_name/cart/:cart_id/:seat_id

Removes one item from the cart.

Path parameters

NameTypeDescription
client_namestringYour short client name
cart_idstringID of the cart
seat_idstringID of the item to remove (from the cart response)

Response

200 OK — empty body.


See also: Events · Ticket types · Order