cart.coupon-apply
Applies a coupon to the store products in the cart.
POST
/api/v1/{locale}/cart/coupon/applyAPI scope cart.coupon-apply
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 |
|---|---|---|---|
code | string | Required | Coupon code to apply. |
coupon_checkout | boolean | Optional | Retains checkout selections in the cart session. |
use_credit | boolean | Optional | Applies available balance when eligible. |
payment | string | Optional | Payment method identifier. |
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 '{
"code": "012345"
}' \
"${MINEXON_BASE_URL}/api/v1/en/cart/coupon/apply"Response
HTTP 200 · application/json
| Field | Type | Requirement | Description |
|---|---|---|---|
data | object | Required | Coupon operation result. |
data.code | string | null | Required | Applied coupon code or null after removal. |
{
"data": {
"code": "WELCOME"
}
}Flow and error cases
HTTP 422 returns error and minimum, with a value only for the minimum-amount error.
HTTP 422 · application/json
{
"error": "minimum",
"minimum": 5000
}