Skip to navigation

Add one or more lines to a cart

Adds one or more items to an existing cart and returns the updated cart with recalculated totals. For a timed ticket, this is the call that actually holds capacity — checking availability with GET /api/schedules/ticket reserves nothing on its own.

Headers

x-entriastringRequired

Identifies which store this request is for. Required on every store-scoped route. It is not authentication and not a secret — it grants no privileges and is safe to send from a browser. You receive the value once your Entria backend has been created and configured. Missing header returns 400; an unknown store returns 404.

Request

This endpoint expects an object.
cartIdstringRequired
Id of the cart to add lines to, as returned when it was created.
lineslist of objectsRequired

One or more lines to add. Every line needs a type (TICKET, ATTRACTION_PACKAGE, MEMBERSHIP, MEMBERSHIP_RENEW, VOUCHER, DONATION, or GENERIC) and a product sku; every type but MEMBERSHIP_RENEW also needs a quantity. TICKET lines send date and startTime together — both, or neither. Neither is only valid for a next-available product, where the slot is assigned automatically; if the product requires a schedule, one without the other is rejected and so is a schedule-requiring ticket sent with neither. ATTRACTION_PACKAGE lines follow the same rule: both date and startTime, or neither — neither is only valid when every component is next-available, and a package with a component that requires a chosen time is rejected when sent with neither. VOUCHER and DONATION lines need a price for the amount the shopper entered; MEMBERSHIP lines need an activationDate. MEMBERSHIP_RENEW lines need exactly one of the cardNumber of the membership being altered, or the membershipNumber of one of the member’s own memberships — with the member token, or with the OAuth client token plus the member’s email — and carry no quantity — one membership, one renewal. The sku must be one GET /api/membership/alterations (by card) or GET /api/member/alterations (by membershipNumber) offered for it; pass subscription to renew by recurring payment.

Response

The cart after the new lines were added, with recalculated totals and, for timed tickets, an active capacity hold.
cartobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error