post
https://{host}/api_gateway/v1/promotions//deactivate
This API is used to deactivate an already active Cart promotion
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 Z2VvcmdlLmJ1a2w6NNDkxOGFmNDI3MGQ3YzI4ZjU4ZjY3MmNhZjY1ZmY=' \
--header 'Cookie: _cfuvid=DWAI.W93CwD8Hhdi338lKP84bJoUrRqwVps-1761979737913-0.0.1.1-604800000' \
--data ''Prerequisites
-
Authentication: Basic or OAuth authentication.
-
Default access group
Resource information
| Pagination | No |
| Batch support | No |
Rate limit
-
Demo and Testing Clusters: 1,000 requests per minute per API key
-
Other Organizations: The rate limit is brand-specific.
To modify the limit, create a ticket with the Capillary Product support team.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| promotionId | String | Yes | Specifies the unique identifier for the promotion to be deactivated. |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| customerId | Number | Yes | Specifies the unique identifier for the customer. |
Example response
{
"data": true,
"errors": []
}
Response parameters
| Field | Type | Description |
|---|---|---|
| data | Boolean | Indicates the success status of the operation. true means it was successful. |
| errors | Array | Defines a list of error objects. Indicates it will be empty on success. |
Error codes
| Code | Description |
|---|---|
| 400 | Invalid request. Check required parameters. Ensure all required parameters, including a valid promotionId, are provided and valid. |
| 404 | Promotion not found. Use a valid and existing promotionId. |
| 706 | Promotion has expired. Use a valid, non-expired promotion for the deactivation operation. |
| 707 | The passed promotion type is not supported. Change the promotion type to one supported by the system. |
| 713 | Earned from type cannot be changed. Do not change earnedFromType on existing earned promotions. |
| 500 | Internal server error. Retry the request after a short delay, and contact support if the error persists. |
