Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Basic Details
Parameters used in all requests are described here.
Parameters
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
shop_secret | string | required | Store 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 parametersRequest
codeEndpoint |
---|
language | js |
---|---|
theme | FadeToGrey |
personaclick("subscription", "manage", params);
Request parameters
Request Type | Content-Type | |
---|---|---|
https://api.personaclick.com/subscriptions/manage | POST | application/x-www-form-urlencoded |
Parameters
Note |
---|
See "Basic Details" above for more information on required parameters. |
Name | Type | Description |
---|---|---|
string |
The current user's Email. | |
phone | string |
The current user's Phone. | |
email_bulk | boolean |
It changes the current user's subscription status to bulk email campaigns. | |
email_chain | boolean |
It changes the current user's subscription status to triggered email campaigns. | |
email_transactional | boolean |
It changes the current user's subscription status for transactional email campaigns. | |
sms_bulk | boolean |
It changes the current user's subscription status to bulk SMS campaigns. | |
sms_chain | boolean |
It changes the current user's subscription status to triggered SMS campaigns. | |
sms_transactional | boolean |
It changes the current user's subscription status for transactional SMS campaigns |
. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | There are no parameters to change the status of subscriptions. |
403 Forbidden | The request was unsuccessful. |
404 Not Found | There are no mandatory parameters in the query. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
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 | ||||
---|---|---|---|---|
| ||||
personaclick("subscription", "manage", {
email: "john.doe@examplestore.com",
email_bulk: true,
email_chain: false,
email_transactional: true,
}); |
Code Block | ||||
---|---|---|---|---|
| ||||
personaclick("subscription", "manage", {
phone: "+100000000000",
sms_bulk: false,
sms_chain: false,
sms_transactional: true
}); |
Code Block | ||||
---|---|---|---|---|
| ||||
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 | ||||
---|---|---|---|---|
|