post
https://{Host}/api_gateway/v1/promotions//activate
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
This API allows you to activate a promotion for a specific customer to make it available for their use or to resume their participation in a campaign. This is primarily used for Customer Opt-in scenarios and to reactivate individual rewards via earnId that were previously suspended or opted out.
This endpoint only modifies the status for a single customer while other customers' eligibility remains unchanged. To activate promotion globally, use the Activate Promotion API.
Example request
curl --location 'https://{Host}/api_gateway/v1/promotions/{PromotionId}/activate?customerId=566881933' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmRvY2RlbW86NjV1NTY5NDk1YmNkNzUxYmJiY2U=' \
--header 'Cookie: _cfuvid=JTn6J554SYRm2gTn9i2lJMz39zEaGAvDWdREw-1770697785684-0.0.1.1-604800000' \
--data '
{
"customerId": "566881933",
"earnId": "1234123"
}
'
Prerequisites
- Authentication: Basic or OAuth authentication.
- Default access group
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| promotionId | String | Yes | Unique identifier for the promotion to be activated. |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| customerId | Number | Yes | The unique identifier of the customer. |
| earnId | String | Optional | The specific earn ID to link the activation to. Required for PAYMENT_VOUCHER modes. Not supported for promotions with PromotionMode.DISCOUNT. |
Example response
{
"data": true,
"errors": []
}
Response parameters
| Field | Type | Description |
|---|---|---|
| data | Boolean | Returns true if the activation was successful. |
| errors | Array | A list of error objects (empty on success). |
Error codes
| Code | Description |
|---|---|
| 400 | GLOBAL.INVALID_INPUT: Check required parameters and formats. |
| 404 | GLOBAL.PROMOTION_NOT_FOUND: The specified promotionId does not exist or is not globally active. |
| 707 | PROMO.UNSUPPORTED_PROMOTION_TYPE: Cannot activate for POS or CODE promotion types. |
| 731 | PROMO.EARN_ID_INVALID: The provided earnId is invalid or doesn't belong to the customer/promotion. |
| 736 | PROMO.UNSUPPORTED_PREFERENCE_CHANGE: Incorrect combination of earnId and promotion mode. This error occurs if you pass earnId for a promotion configured with PromotionMode.DISCOUNT, or if the instance-level change is not supported for the promotion. |
| 737 | PROMO.UNSUPPORTED_PREFERENCE_CHANGE_PENDING_CART: Cannot change status while the customer has an open cart. |
| 500 | GLOBAL.UNEXPECTED_ERROR: Internal server error. Retry after a delay. |
200Successful response
