Update a cart item quantity
PATCH
/cart/{cartId}/items/{itemId}
Sets the quantity of a cart line item. A quantity of 0 removes the item. Returns the updated cart. Soft auth.
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
Type
string
Path Parameters
cartId*
Type
Requiredstring
itemId*
Type
Requiredstring
Request Body
application/json
JSON "quantity": 0
{
}
Responses
Updated cart
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 }
{
}