Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v74
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
  • Suppression lists
  • Templates and fragments
  • Campaigns
  • Mailings
  • Automation scenarios
  • Loyalty Programs
  • 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
  • SendersDev
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
  • Promo codes
  • Get promo code information
Documentation for version v74

Get promo code information

Description​

Retrieves a loyalty program promotional code information.

Request URL​

Method: POST

https://example.com/api/v1.1/promocodes/get

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatint"json"NoResponse data format
By default – json
codestring"CODE-12345"YesPromo code
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": {
"created": "2024-04-01T12:39:34Z",
"is_attached": false,
"is_activated": false,
"is_expired": false,
"attached": "",
"activated": "",
"expired": "",
"expire_date": "",
"loyalty_id": 5,
"code": "CODE-1"
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<activated/>
<attached/>
<code>CODE-1</code>
<created>2024-04-01T12:39:34Z</created>
<expire_date/>
<expired/>
<is_activated>false</is_activated>
<is_attached>false</is_attached>
<is_expired>false</is_expired>
<loyalty_id>5</loyalty_id>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response parameters​

ПараметрТипОписание
errorintError code
error_textstringError text
activateddatetimePromo code activation time
attacheddatetimePromo code attach time
codestringPromo code
createddatetimePromo code creation time
expire_datedatetimePromo code expire date
expireddatetimePromo code expire date
is_activatedboolActivation flag
is_attachedboolAttached to a profile flag
is_expiredboolExpired flag
loyalty_idintLoyalty program ID
database_idintDatabase ID, if promocode attached to profile
profile_idstringProfile ID, if promocode attached to profile
Last updated on Feb 28, 2024
Previous
Import promo codes
Next
Activate promo code
  • Description
  • Request URL
  • Request parameters
  • Request example
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.