Cart (storefront API)
Storefront and customer routes of the cart module. Send Accept-Language (or X-Locale from a browser) on every call; a customer route needs the session cookie.
DELETE /v1/cart
Section titled “DELETE /v1/cart”Clear shopping cart
Responses:
204: Cart cleared.
GET /v1/cart
Section titled “GET /v1/cart”Get shopping cart
Responses:
200: Cart retrieved.
DELETE /v1/cart/coupon
Section titled “DELETE /v1/cart/coupon”Remove coupon from cart
Responses:
200: Coupon removed.
POST /v1/cart/coupon
Section titled “POST /v1/cart/coupon”Apply coupon code
Request body: ApplyCouponDto.
Responses:
200: Coupon applied.400: Invalid coupon.
GET /v1/cart/estimate
Section titled “GET /v1/cart/estimate”Estimate shipping cost
Parameters:
countryin query (string, pattern/^[A-Z]{2}$/, min length 2, max length 2, required).postalCodein query (string, min length 3, max length 10, optional).
Responses:
200: Shipping estimate retrieved.400: Invalid input.
DELETE /v1/cart/gift-card
Section titled “DELETE /v1/cart/gift-card”Remove gift card from cart
Responses:
204: Gift card removed.
POST /v1/cart/gift-card
Section titled “POST /v1/cart/gift-card”Apply gift card
Request body: ApplyGiftCardDto.
Responses:
200: Gift card applied; returns the updated cart.400: Invalid gift card.
POST /v1/cart/items
Section titled “POST /v1/cart/items”Add item to cart
Request body: AddItemDto.
Responses:
200: Item added.400: Invalid input.404: Variant not found.
DELETE /v1/cart/items/{itemId}
Section titled “DELETE /v1/cart/items/{itemId}”Remove cart item
Parameters:
itemIdin path (string, required).
Responses:
200: Item removed.404: Item not found.
PATCH /v1/cart/items/{itemId}
Section titled “PATCH /v1/cart/items/{itemId}”Update cart item
Parameters:
itemIdin path (string, required).
Request body: UpdateItemDto.
Responses:
200: Item updated.400: Invalid input.404: Item not found.
POST /v1/cart/items/{itemId}/save-for-later
Section titled “POST /v1/cart/items/{itemId}/save-for-later”Save item for later
Parameters:
itemIdin path (string, required).
Responses:
200: Item saved.401: Unauthorized.404: Item not found.
POST /v1/cart/merge
Section titled “POST /v1/cart/merge”Merge the anonymous cart into the signed-in cart
Responses:
200: Merged cart returned.401: Unauthorized.
Schemas
Section titled “Schemas”AddItemDto
Section titled “AddItemDto”variantId(string, required).quantity(number, min 1, required).
ApplyCouponDto
Section titled “ApplyCouponDto”code(string, pattern/^[A-Z0-9_-]+$/i, max length 50, required).
ApplyGiftCardDto
Section titled “ApplyGiftCardDto”code(string, pattern/^[A-Z0-9]+$/, min length 8, max length 20, required).
UpdateItemDto
Section titled “UpdateItemDto”quantity(number, min 1, required).