Skip to main content
POST
Add/delete cart item

Authorizations

Authorization
string
header
required

Access token

Path Parameters

id
string
required

Cart ID

Body

application/json

Schema for updating a cart item, including adding, removing, or adjusting the quantity of a product or variant.

product_id
string
required

The ID of the product to update in the cart.

Example:

"01H9XYZ12345ABCDE"

variant_id
string | null
required

The ID of the product variant, or null if the product has no variants.

Example:

null

quantity
integer
required

The quantity of the product to add to or update in the cart. Use 0 to remove the item from the cart.

Required range: x >= 0
Example:

1

Response

OK

message
string
required
success
boolean
required
content
object
required