Skip to content

Storefront API

Base URL: /api/v1. Use these endpoints to list published products, search, collect reviews, manage a cart, and start checkout.

GET /api/v1/catalog

Query params: page, limit (max 100), locale, currency, categoryId

Response:

{
"products": [...],
"total": 42,
"page": 1,
"limit": 20
}

GET /api/v1/catalog/:id

Get a single product by id.

Query params: locale, currency

GET /api/v1/categories

List all categories.

Query params: locale

GET /api/v1/search

Query params: q, page, limit, locale, currency, categoryId, sortBy, sortDir

GET /api/v1/products/:productId/reviews

List approved reviews for a product.

Query params: page (default 1), limit (default 10, max 100)

Response:

{
"reviews": [...],
"total": 12,
"page": 1,
"limit": 10,
"totalPages": 2
}

POST /api/v1/products/:productId/reviews

Submit a product review (status starts as pending until moderated).

Body: { "customerId": "...", "rating": 5, "title": "Optional", "body": "Great product" }

Response: 201 with { "review": { ... } }

POST /api/v1/cart

Body:

{ "currency": "USD", "customerId": "optional" }

Response: 201 with { "cart": { ... } }

The returned cart includes a token. Use that token on every later cart request.

GET /api/v1/cart/:token

Get a cart by its token.

DELETE /api/v1/cart/:token

Delete a cart.

POST /api/v1/cart/:token/lines

Body:

{ "variantId": "cld...", "quantity": 2, "currency": "USD" }

PATCH /api/v1/cart/:token/lines/:lineId

Update a line’s quantity.

Body: { "quantity": 3 } — set to 0 or negative to remove.

DELETE /api/v1/cart/:token/lines/:lineId

Remove a line from the cart.

POST /api/v1/checkout

Create a checkout session from a cart.

Body:

{
"cartToken": "uuid...",
"email": "[email protected]",
"customerId": "optional"
}

Response: 201 with { "session": { ... } }

GET /api/v1/checkout/:id

Get a checkout session.

POST /api/v1/checkout/:id/update

Update checkout session fields (address, shipping option, payment provider, tenders, etc.). Pass a full payload with shippingAddressJson, shippingOptionJson, and paymentProvider to validate a complete checkout before order placement.