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
Manage Subscriptions
Method Objective
The method allows changing the status of the current user's subscriptions to notification channels.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/subscriptions/manage | POST | application/x-www-form-urlencodedjson |
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 |
Name | Type | Description | ||
---|---|---|---|---|
string | The current user's Email. | |||
phone | string | The current user's Phonephone number in international format.
| ||
external_id | string | Store side user ID. | ||
loyalty_id | sting | The Loyalty Program user ID (loyalty card). | ||
telegram_id | sting | Telegram User ID. | ||
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.
| ||
web_push_bulk | boolean | It changes the current user's subscription status to bulk webpush campaigns. | ||
web_push_chain | boolean | It changes the current user's subscription status to triggered webpush campaigns. | ||
web_push_transactional | boolean | It changes the current user's subscription status for transactional webpush campaigns.
| ||
mobile_push_bulk | boolean | It changes the current user's subscription status to bulk app campaigns. | ||
mobile_push_chain | boolean | It changes the current user's subscription status to triggered app campaigns. | ||
mobile_push_transactional | boolean | It changes the current user's subscription status for transactional app 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 queryrequest. |
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 | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/subscriptions/manage' \ -X 'POST' \ -H 'content-type: application/x-www-form-urlencodedjson' \ -d '{"email=":"john.doe%40examplemaildoe@examplemail.com&","email_bulk=true&":"true","email_chain=true&":"true","email_transactional=false&":"false","sms_bulk=false&":"false","sms_chain=true&sms_transactional=false&shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef":"true","sms_transactional":"false","web_push_bulk":"true","web_push_chain":"true","web_push_transactional":"false","mobile_push_bulk":"false","mobile_push_chain":"true","mobile_push_transactional":"false","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef"}' |
System Operations
Method Objective
The method allows marking email addresses with system statuses and unsubscribing from all types of campaigns.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/subscriptions/callback | POST | application/ |
json |
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 |
Name | Type | Description |
---|---|---|
event | string | Specifies the action to be performed with the email. Available values:
|
string | Email address for marking. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | There |
is no event parameter, or the paramenter has an incorrect value. | |
403 Forbidden | The request was unsuccessful. |
404 Not Found | There are no mandatory parameters in the |
request. |
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
ExampleExamples
Code Block | ||||
---|---|---|---|---|
| ||||
# testhard_bounce event curl 'https://api.personaclick.com/subscriptions/callback' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"email":"john.doe@examplemail.com","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef","event":"hard_bounced"}' # complained event curl 'https://api.personaclick.com/subscriptions/callback' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"email":"john.doe@examplemail.com","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef","event":"complained"}' # blacklisted event curl 'https://api.personaclick.com/subscriptions/managecallback' \ -X 'POST' \ -H 'content-type: application/x-www-form-urlencodedjson' \ -d '{"email":"john.doe@examplemail.com","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef","event":"blacklisted"}' # unsubscribed event curl 'https://api.personaclick.com/subscriptions/callback' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"email=":"john.doe%40examplemail.com&email_bulk=true&email_chain=true&email_transactional=false&sms_bulk=false&sms_chain=true&sms_transactional=false.doe@examplemail.com","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef","event":"unsubscribed"}' |
Subscription Statuses
Method Objective
The method allows checking the user's current subscription status by email or phone number.
Request
Endpoint | Request Type |
---|---|
https://api.personaclick.com/subscriptions/check | GET |
Parameters
Name | Type | Requirement | Description | ||
---|---|---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings | ||
shop_secret | string | required if "did" isn't used | Store Secret Key in PersonaClick. Located there: Account > Settings > Store Settings | ||
did | string | required if "shop_secret" isn't used | Unique Device ID. See "Initialization (REST API)" for information about getting and using Device ID. | ||
string | required if "shop_secret" is used | Email address for checking. | |||
phone | string | required if "shop_secret" is used | Phone number in international format for checking.
|
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | There are no email or phone parameters. |
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Available only in case of an error. Contains the "error" value in this case. |
message | string | Available only in case of an error. Contains a description of the error. |
exists | boolean | Shows whether a profile with the requested property exists or not. |
email_confirmed | boolean | Shows whether the email is confirmed or not. |
email_bulk | boolean | Email subscription status for bulk campaigns. |
email_chain | boolean | Email subscription status for chain/trigger campaigns. |
email_transactional | boolean | Email subscription status for transactional campaigns. |
email_bounced | boolean | The email is hard bounced or not. |
email_suppressed | boolean | The email is suppressed or not. |
email_blacklisted | boolean | The email is blacklisted or not. |
email_invalid | boolean | The email is invalid or not. |
sms_bulk | boolean | Phone subscription status for SMS bulk campaigns. |
sms_chain | boolean | Phone subscription status for SMS chain/trigger campaigns. |
sms_transactional | boolean | Phone subscription status for SMS transactional campaigns. |
web_push | boolean | Whether or not the user with the email/phone has a subscription to web push. |
web_push_bulk | boolean | Web-push subscription status for bulk campaigns. |
web_push_chain | boolean | Web-push subscription status for chain/trigger campaigns. |
web_push_transactional | boolean | Web-push subscription status for transactional campaigns. |
mobile_push | boolean | Whether or not the user with the email/phone has a subscription to mobile app push. |
mobile_push_bulk | boolean | Mobile app push subscription status for bulk campaigns. |
mobile_push_chain | boolean | Mobile app push subscription status for chain/trigger campaigns. |
mobile_push_transactional | boolean | Mobile app push subscription status for transactional campaigns. |
telegram_bulk | boolean | Telegram subscription status for bulk campaigns. |
telegram_chain | boolean | Telegram subscription status for chain/trigger campaigns. |
telegram_transactional | boolean | Telegram subscription status for transactional campaigns. |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl https://api.personaclick.com/subscriptions/check?email=john.doe%40examplemail.com&shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef' |
|
List of Subscription Changes
Method Objective
The method allows checking the user's current subscription status by email or phone number.
Request
Endpoint | Request Type |
---|---|
https://api.personaclick.com/subscriptions/changes | GET |
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 |
Name | Type | Description | ||
---|---|---|---|---|
string | Email address for checking. | |||
phone | string | Phone number in international format for checking.
| ||
event | string | Filter by the event. Filter by event. Available values:
| ||
channel | string | Filter by the channel. Available values:
| ||
from | string | Start of the period. Format: YYYY-MM-DD. Defaults to 24 hours ago. | ||
to | string | End of period. Format: YYYY-MM-DD. The default is the current moment. | ||
offset | number | Offset relative to the first entry for the selected period. The default is 0. | ||
limit | number | Limit of entries in the API response. The default is 20000. The maximum is 20000. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
403 Forbidden | The request was unsuccessful. |
API Response Data
Note |
---|
The API response is limited to 20000 records per request. |
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
campaign_type | string | Campaign type. Available values:
|
channel | string | Event Channel. Available values:
|
contact | string | The value of contact. |
contact_type | string | Type of contact. Available values:
|
datetime | string | Date of the event in the format YYYY-MM-DDThh:mm:ss.SSS |
event | string | Event Type. Available values:
|
ip | string | The email is suppressed or not. |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl https://api.personaclick.com/subscriptions/changes?shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef&event=subscribe&channel=import&from=2021-05-04&to=2021-05-05&offset=100500&limit=146
|
Force call of the "Subscribed" event
Method Objective
The method allows force-calling the "Subscribed" event to send a double opt-in email.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/subscriptions/confirm_email | POST | application/json |
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 |
Name | Type | Description |
---|---|---|
string | Email address for which the "Subscribed" event should be triggered |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful |
400 Bad Request | One of the reasons:
|
403 Forbidden | The request was unsuccessful |
404 Not Found | There are no mandatory parameters in the request |
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 Examples
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/subscriptions/confirm_email' \
-X 'POST' \
-H 'content-type: application/json' \
-d '{"email":"john.doe@examplemail.com","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef"}'
|
Column | ||||
---|---|---|---|---|
Page Navigation
|
Related Pages
|