Activate promo code
Description
Activates a promo code.
caution
You can only activate a promotional code when it is attached to a profile.
Request URL
Method: POST
https://example.com/api/v1.1/promocodes/activate
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
code | string | "CODE-12345" | Yes | Promo code |
format | int | "json" | No | Response data format. By default– json |
loyalty_id | int | "1" | Yes | Loyalty program ID |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"code": "Code-1",
"loyalty_id": 5
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<code>Code-1</code>
<loyalty_id>5</loyalty_id>
</xml>
Response example
- JSON
- XML
{
"data": null,
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data/>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |