Versions Compared

Key

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

Basic Details

Parameters used in all requests are described here.

Parameters

NameTypeRequirementDescription
shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
shop_secretstringrequiredStore Secret Key in PersonaClick. Located there: Account > Settings > Store Settings


Checking the "Back in Stock" trigger subscription

Method Objective

The method allows checking the subscription status of the "Back in Stock" trigger.

Syntax and parameters

Request

codeRequest parameters
Endpoint
languagejs
themeFadeToGrey
personaclick("check_trigger", "product_available", params, success, error);
NameTypeRequirementDescriptionparamsObjectrequiredObject with request parameters.successFunctionrequiredCallback-function, where the API response will be passed to. Response type: object.errorFunctionoptionallyCallback-function to be called when an error occurs (any HTTP status code other than 200).
Request Type
https://api.personaclick.com/products/check_product_available_subscriptionGET

Parameters

Note

Only parameters related to the profile update request are listed here. See "Basic Details" above for more information on required parameters and the API endpoint.


NameTypeRequirementDescription
itemarraystring/numberrequiredAn array of product IDs for which the user would like to unsubscribe from the product availability notification. You can use an empty array to unsubscribe from all products.Product ID
emailstringoptionallyOne of the available ones is requiredEmail for subscription checking.
phonestringoptionallyPhone for subscription checking.
loyalty_idstringoptionallyLoyalty ID for subscription checking.
NoteIf no email, phone, or loyalty_id is specified, only the user's current device will be checked. It won't take into account subscriptions performed on the user's other devices.

API response properties

NameTypeDescription
statusbooleanShows whether or not there is a trigger subscription for the product

Example of use

Code Block
languagejs
themeFadeToGrey
personaclick("check_trigger", "product_available", {item: "100500", email: "john.doe@examplestore.com"}, function(response) {
    if (response.status) {
        console.log("Subscribed!");
    } else {
        console.log("Not subscribed!");
    }
}, function(error) {
  // if the request failed.
});
Code Block
languagejs
themeFadeToGrey
personaclick("check_trigger", "product_available", {item: "100500"}, function(response) {
    if (response.status) {
        console.log("Subscribed!");
    } else {
        console.log("Not subscribed!");
    }
}, function(error) {
  // if the request failed
});curl 'https://api.personaclick.com/products/check_product_available_subscription?email=john.doe%40examplemail.com&shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef&item_id=100500'



Checking the "Price Drop" trigger subscription

Method Objective

The method allows checking the subscription status of the "Price Drop" trigger.

Syntax and parameters

Request

codeNameTypeRequirementDescriptionparamsObjectrequiredObject with request parameters.successFunctionrequiredCallback-function, where the API response will be passed to. Response type: object.errorFunctionoptionallyCallback-function to be called when an error occurs (any HTTP status code other than 200).Request parameters
Endpoint
languagejs
themeFadeToGrey
personaclick("check_trigger", "product_price_decrease", params, success, error);
Request Type
https://api.personaclick.com/products/check_price_drop_subscriptionGET

Parameters

Note

Only parameters related to the profile update request are listed here. See "Basic Details" above for more information on required parameters and the API endpoint.


If no email, phone, or loyalty_id is specified, only the user's current device will be checked. It won't take into account subscriptions performed on the user's other devices.
NameTypeRequirementDescription
item
array
string/numberrequired
An array of product IDs for which the user would like to unsubscribe from the product availability notification. You can use an empty array to unsubscribe from all products.
Product ID
emailstring
optionally
One of the available ones is requiredEmail for subscription checking
.
phonestring
optionally
Phone for subscription checking
.
loyalty_idstring
optionally
Loyalty ID for subscription checking
.
Note

API response properties

NameTypeDescription
statusbooleanShows whether or not there is a trigger subscription for the product

Example of use

Code Block
languagejs
themeFadeToGrey
personaclick("check_trigger", "product_price_decrease", {item: "100500", email: "john.doe@examplestore.com"}, function(response) {
    if (response.status) {
        console.log("Subscribed!");
    } else {
        console.log("Not subscribed!");
    }
}, function(error) {
  // if the request failed.
});
Code Block
languagejs
themeFadeToGrey
personaclick("check_trigger", "product_price_decrease", {item: "100500"}, function(response) {
    if (response.status) {
        console.log("Subscribed!");
    } else {
        console.log("Not subscribed!");
    }
}, function(error) {
  // if the request failed
});curl 'https://api.personaclick.com/products/check_price_drop_subscription?email=john.doe%40examplemail.com&shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef&item_id=100500'


Table of Contents
maxLevel2
classpersonaclick-fixed-position