cart.update
Sets a cart line quantity or removes it by setting zero.
POST
/api/v1/{locale}/cart/items/updateAPI scope cart.update
Request
Send Authorization: Bearer <key> with each request.
Preserve the same session cookie across the steps in this flow.
Path parameters
| Field | Type | Requirement | Description |
|---|---|---|---|
locale | tr or en | Required | Request locale. |
Request body
| Field | Type | Requirement | Description |
|---|---|---|---|
product | string | Required | Product slug. |
set_quantity | integer | Optional | New quantity. Takes precedence over quantity when supplied. |
quantity | integer | Optional | New quantity when set_quantity is absent. Send one of the two fields. |
Run samples from your application server. See Quickstart for variables and sessions.
curl --fail-with-body --request POST \
-H "Authorization: Bearer $MINEXON_API_KEY" \
-b "$MINEXON_COOKIE_JAR" -c "$MINEXON_COOKIE_JAR" \
-H 'Content-Type: application/json' \
--data '{
"product": "example-product",
"set_quantity": 1
}' \
"${MINEXON_BASE_URL}/api/v1/en/cart/items/update"Response
HTTP 200 · application/json
| Field | Type | Requirement | Description |
|---|---|---|---|
data | object | Required | Operation result. |
data.count | integer | Required | Total remaining quantity in the cart. |
data.notice | string | null | Required | Change notification. |
{
"data": {
"count": 1,
"notice": "updated"
}
}Flow and error cases
HTTP 422 · application/json
{
"error": "invalid"
}HTTP 409 · application/json
{
"error": "stock_exceeded"
}