Get the current state of a cart

Reads back a cart’s lines, totals and checkoutUrl by id. Use it to re-render the basket on load, or to restore a returning shopper’s basket from a saved cart id. It only reads the cart — it never adds, removes or re-prices items.

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

cartIdstringRequired
The id returned when the cart was created.

Response

The cart as it currently stands, including its items, totals and checkoutUrl.
cartobject

Errors

404
Not Found Error