post
https://{Host}/api_gateway/v1/promotions//deactivate
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
This API is used to deactivate an individual customer's participation in an active campaign. It can also be used to revoke specific rewards that have been earned, by passing the earnId.
Example request
curl --location --request POST 'https://{Host}/api_gateway/v1/promotions/`{promotionId}`/deactivate?customerId=566881933&earnId=null' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmJ1GFmNDI3MGQ3YzI4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=DWAI.W93CwD8Hhdi33884bJoUrRqwVps-1761979737913-0.0.1.1-604800000' \
--data ''Prerequisites
-
Authentication: Basic or OAuth authentication.
-
Default access group
Resource information
| Pagination | No |
| Batch support | No |
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| promotionId | String | Yes | Unique identifier for the promotion to be deactivated. |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| customerId | Number | Yes | The unique identifier of the customer. |
| earnId | String | Optional | The specific earn ID to deactivate. Required for PAYMENT_VOUCHER modes. |
Example response
{
"data": true,
"errors": []
}
Response parameters
| Field | Type | Description |
|---|---|---|
| data | Boolean | Returns true if the deactivation was successful. |
| errors | Array | A list of error objects (empty on success). |
Error codes
| Code | Description |
|---|---|
| 400 | GLOBAL.INVALID_INPUT: Required parameters are missing or invalid. |
| 404 | GLOBAL.PROMOTION_NOT_FOUND: The promotion does not exist or is not active. |
| 707 | PROMO.UNSUPPORTED_PROMOTION_TYPE: Cannot deactivate preferences for POS or CODE promotions. |
| 731 | PROMO.EARN_ID_INVALID: The provided earnId is invalid. |
| 736 | PROMO.UNSUPPORTED_PREFERENCE_CHANGE: Incorrect combination of earnId and promotion mode. |
| 737 | PROMO.UNSUPPORTED_PREFERENCE_CHANGE_PENDING_CART: Cannot change status while the customer has an open cart. |
| 500 | GLOBAL.UNEXPECTED_ERROR: Internal server error. |
200Successful response
