Get a cart
GET
/cart/{cartId}
Returns a cart (with items and computed subtotal) for the account resolved from tenant context or the x-account-id header. Auth is soft: a customer token is decoded if present but not required.
Auth: Bearer JWT optional (guest-friendly).
Authorizations
bearerAuth
Jeton client obtenu par POST /auth/login (ou /auth/register), renouvelé par POST /auth/refresh.
Type
HTTP (bearer)
or
Parameters
Header Parameters
x-account-id
Account id fallback when tenant context is not resolved
Type
string
Path Parameters
cartId*
Type
Requiredstring
Responses
Cart with items and subtotal
application/json
JSON "ok": true, "data": { "cartId": "123e4567-e89b-12d3-a456-426614174000", "accountId": "string", "customerId": "string", "sessionId": "string", "currency": "string", "notes": "string", "expiresAt": "2024-01-01T00:00:00Z", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-01T00:00:00Z", "items": [ { "itemId": "string", "productId": "string", "variantId": "string", "quantity": 0, "unitPrice": 0, "addedAt": "2024-01-01T00:00:00Z" } ], "subtotal": 0 }
{
}