Create a new cart

Starts a new, empty cart and returns its id. Keep that id for the rest of the shopper's session: every other cart endpoint is scoped to it, and it cannot be recovered from anything else. Pass `identity` to tie the cart to a known customer from the start so their own pricing applies immediately; leave it out for an anonymous cart. The response also includes `checkoutUrl`, the hosted page you send the shopper to when they are ready to pay.

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.

Query parameters

localestringOptionalDefaults to da-DK

BCP 47 locale for the cart contents (e.g. da-DK, en-US). Defaults to the store’s configured locale.

identitystringOptional

Opaque, encrypted token identifying a known customer, issued as part of your integration setup. Pass it through exactly as received; it is not something you construct yourself. Omit it to create an anonymous cart.

Response

The newly created cart, including its id and checkoutUrl.
cartobject

Errors

400
Bad Request Error
404
Not Found Error