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


Manage Subscriptions

Method Objective

The method allows changing the status of the current user's subscriptions to notification channels.

Syntax and parameters

Request

code
NameTypeRequirement
Endpoint
languagejs
themeFadeToGrey
personaclick("subscription", "manage", params);
NameTypeRequirementDescriptionparamsObjectrequiredObject with request parameters.

Request parameters

Request TypeContent-Type
https://api.personaclick.com/subscriptions/managePOSTapplication/x-www-form-urlencoded

Parameters

Note

See "Basic Details" above for more information on required parameters.


Name

Type

Description

email

string
optionally

The current user's Email.

phonestring
optionally
The current user's Phone.
email_bulkboolean
optionally
It changes the current user's subscription status to bulk email campaigns.
email_chainboolean
optionally
It changes the current user's subscription status to triggered email campaigns.
email_transactionalboolean
optionally
It changes the current user's subscription status for transactional email campaigns.
sms_bulkboolean
optionally
It changes the current user's subscription status to bulk SMS campaigns.
sms_chainboolean
optionally
It changes the current user's subscription status to triggered SMS campaigns.
sms_transactionalboolean
optionally
It changes the current user's subscription status for transactional SMS campaigns
.
Examples of use
.

API Response Code

HTTP status code

Description
200 OK

The request was successful.

400 Bad RequestThere are no parameters to change the status of subscriptions.
403 ForbiddenThe request was unsuccessful.
404 Not FoundThere are no mandatory parameters in the query.

API Response Data

The response is JSON type with the following properties:

NameTypeDescription
statusstring

Current status. Can have one of two values:

  • success - the request was successful
  • error - the request was unsuccessful
messagestring

The text of the error if it occurred

Request Example

Code Block
languagejs
themeFadeToGrey
personaclick("subscription", "manage", {
    email: "john.doe@examplestore.com",
    phone: "+100000000000",
    email_bulk: true,
    email_chain: true,
    email_transactional: true,
    sms_bulk: true,
    sms_chain: true,
    sms_transactional: true
});
Code Block
languagejs
themeFadeToGrey
personaclick("subscription", "manage", {
    email: "john.doe@examplestore.com",
    email_bulk: true,
    email_chain: false,
    email_transactional: true,
});
Code Block
languagejs
themeFadeToGrey
personaclick("subscription", "manage", {
    phone: "+100000000000",
    sms_bulk: false,
    sms_chain: false,
    sms_transactional: true
});
Code Block
languagejs
themeFadeToGrey
personaclick("subscription", "manage", {
    email_transactional: true,
    sms_transactional: true
});curl 'https://api.personaclick.com/subscriptions/manage' \
  -X 'POST' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'email=john.doe%40examplemail.com&email_bulk=true&email_chain=true&email_transactional=false&sms_bulk=false&sms_chain=true&sms_transactional=false&shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef'


System Operations


Subscription Statuses



List of Subscription Changes



Table of Contents
maxLevel3
classpersonaclick-fixed-position