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
  • Update promo code
Documentation for version v72

Update promo code

Description​

Updates promo code expiry date, activates or deactivates a promo code.

Request URL​

Method: POST

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

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatint"json"NoResponse data format.
By default – json
activatedbooltrueNoPromo code activation or deactivation
codestring"CODE-12345"YesPromotional code
expire_datestring"2018-08-25T08:00:00Z"NoPromo code expire date in RFC 3339 format
loyalty_idint1YesLoyalty program ID
caution

At least one of request options is expected for a successful operation, expiry date change or activation/deactivation.

Request example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"activated": true,
"code": "CODE-12345",
"expire_date": "2018-08-25T08:00:00Z",
"loyalty_id": 1,
"token": "abcdefghijklmnqrstuvwxyz"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<activated>true</activated>
<code>Code-1</code>
<expire_date>2024-08-10T08:00:00Z</expire_date>
<loyalty_id>6</loyalty_id>
</xml>

Response example​

  • JSON
  • XML
{
"data": null,
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data></data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response parameters​

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