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
  • Get all promo codes
Documentation for version v72

Get all promo codes

Description​

Retrieves all promo codes from a loyalty program.

URL​

Method: POST

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

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatint"json"NoResponse data format.
By default – json.
loyalty_idint1YesLoyalty program ID

Request example​

  • JSON
  • XML
{
"loyalty_id": 6,
"token": "abcdefghijklmnqrstuvwxyz"
}
<xml>
<loyalty_id>6</loyalty_id>
<token>abcdefghijklmnqrstuvwxyz</token>
</xml>

Response example​

  • JSON
  • XML
{
"data": [
{
"code": "Code-1"
},
{
"code": "Code-2",
"attached": "2024-04-01T14:02:05Z",
"activated": "2024-04-01T14:04:12Z"
},
{
"code": "Code-3"
}
],
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<code>Code-1</code>
</data>
<data>
<activated>2024-04-01T14:04:12Z</activated>
<attached>2024-04-01T14:02:05Z</attached>
<code>Code-2</code>
</data>
<data>
<code>Code-3</code>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response parameters​

ParameterTypeDescription
dataArrayPromo codes list
codestringPromo code
attachedstringAttachment date. No property if not attached
activatedstringActivation date. No property if not activated
expire_datestringPromo code expiry date. Optional parameter
expiredstringExpiry date in case a promo code is expired
errorintError code
error_textstringError text
Last updated on Feb 26, 2024
Previous
Detach promo code
Next
Goals
  • Description
  • URL
  • Request parameters
  • Request example
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.