Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v72
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
  • Static segments
  • Suppression lists
  • Templates and fragments
  • Campaigns
  • Automation scenarios
  • Promo codes
    • Import promo codes
    • Get promo code information
    • Activate promo code
    • Update promo code
    • Attach promo code
    • Detach promo code
    • Get all promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDevv71
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
This is documentation for Altcraft Platform v72. This documentation is no longer maintained.
The information for up-to-date platform version at this page is available (v74).
  • Promo codes
  • Activate promo code
Documentation for version v72

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​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
codestring"CODE-12345"YesPromo code
formatint"json"NoResponse data format.
By default– json
loyalty_idint"1"YesLoyalty 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​

ParameterTypeDescription
errorintError code
error_textstringError text
Last updated on Feb 26, 2024
Previous
Get promo code information
Next
Update promo code
  • Description
  • Request URL
  • Request parameters
  • Request example
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.