Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Paneltoc

Method Objective

The method gives the next promo code from the requested list of promo codes.

Syntax and

method

parameters

Code Block
languagejs
themeFadeToGrey
personaclick("get_promo_code", params, success, error);

NameTypeRequirementDescription
paramsobjectrequiredObject with request parameters. See below.
successfunctionrequiredA callback function, to which the API response will be passed. Response type: string.
errorfunctionoptionallyA callback function that will be called when an error occurs (any HTTP status code other than 200), including when the list of promo codes is empty.

Request parameters

NameTypeRequirementDescription
idnumber/stringrequiredUnique ID of the promo code list.

API response

Type
Value
Description
Type
stringNext promo code from the requested list
string


Note

The received promo code is cached for 2 hours for the current user's device. The end of the caching period is shifted by 2 hours each time if the user opens pages of the site during the caching period.

Example

request for product recommendations

of use

Code Block
languagejs
themeFadeToGrey
personaclick("get_promo_code", {id: 100500}, function(code) {
  // the functionality of using promo code
}, function(error) {
  // when something went wrong
});

Menu tree on the right | Return to the main page

Panel
titleTable of Contents
AnchorMenuMenu

Page Tree
rootJS SDK

Info
titleSupport and Assistance
Every tool is available as an additional option in paid subscription plans. In case of any technical questions, please contact us at support@personaclick.com.



Column

Page Navigation

Table of Contents
maxLevel3
indent0px
stylenone




Related Pages

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
cqllabel = "promocodes"