- Created by Andrey Veprikov, last modified on Aug 03, 2022
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 8 Next »
Method Objective
The method allows importing audiences both in the general list and in a separate segment.
Request
Endpoint | Request Type | Content-Type | Rate Limit | Max Data Size |
---|---|---|---|---|
https://api.personaclick.com/import/audience | POST | application/json | 40 requests/minute | 32 MB/request |
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 |
segment_id | number | optionally | The ID of the static segment. It's available there: Account > CRM > Segments. If not specified, the audience will be imported into the general list. |
audience | Array | required | Object array with the imported audience. See the description below. |
Audience Object
Main parameters
Name | Type | Description |
---|---|---|
string | User Email. This parameter is used as an identifier, so it's required (if the "phone" parameter isn't used). | |
first_name | string | User First Name. |
gender | string | User Gender (m – male, f – female). |
id | number/string | Store side user ID. |
last_name | string | User Surname. |
phone | string | User Phone. This parameter is used as an identifier, so it's required (if the "email" parameter isn't used). |
Additional parameters
Name | Type | Description |
---|---|---|
age | number | User age (in years). |
auto | Object array | List of vehicles. See description below. |
birthday | string | User birthday in the format YYYYY-MM-DD. |
bought_something | boolean | The user has or hasn't ever bought something in the store. |
email_bulk | boolean | Subscribe user to email bulk campaigns. |
email_chain | boolean | Subscribe user to email trigger campaigns. |
email_transactional | boolean | Subscribe user to email transactional campaigns. |
fb_id | string | Facebook User ID. |
kids | Object array | User's children. See description below. |
location | string | The user's current location from the list of locations in the product feed. |
loyalty_bonuses | number | The current number of store bonuses at the user. |
loyalty_bonuses_to_next_level | number | The number of store bonuses necessary for the user to reach the next loyalty level. |
loyalty_card_location | string | The location (from the list of locations in the product feed) where the user last used the loyalty card. |
loyalty_id | string | The Loyalty Program user ID (loyalty card). |
loyalty_status | string | The user's current status in the loyalty program. |
sms_bulk | boolean | Subscribe user to SMS bulk campaigns. |
sms_chain | boolean | Subscribe user to SMS trigger campaigns. |
sms_transactional | boolean | Subscribe user to SMS transactional campaigns. |
telegram_id | string | Telegram User ID. |
vk_id | string | VKontakte User ID. |
The "auto" object properties
Name | Type | Description |
---|---|---|
brand | string | Vehicle Brand. |
model | string | Vehicle Model. |
vds | string | Vehicle's VDS/VIN. |
The "kids" object properties
Name | Type | Description |
---|---|---|
gender | string | Child's age (m – male, f – female). |
birthday | string | Child's birthday in the format YYYY-MM-DD. |
Custom Properties
Name | Type | Description |
---|---|---|
A custom property can have any name except the reserved ones | string | The custom property must be created before it can be used. Located there: Account > Settings > Profile Property If property creation isn't available in the account, contact PersonaClick support. |
integer | ||
float | ||
array of string | ||
json | ||
date (YYYY-MM-DD hh:mm:ss) |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | Unsuccessful authorization. |
Request Example
curl 'https://api.personaclick.com/import/audience' \ -X 'POST' \ -H 'content-type: application/json' \ --data-binary '@data.json' # data.json { "shop_id": "0d42fd8b713d0752776ca589cc0056", "shop_secret": "0123456789abcdef0123456789abcdef", "segment_id": 146, "audience": [ { "email": "john.doe@examplemail.com", "loyalty_id": "000001234567", "phone": "4400114527199", "id": "100500", "fb_id": "000000000354677", "vk_id": "vk031845", "telegram_id": "0125762968357835", "loyalty_card_location": "NY", "loyalty_status": "5% discount", "loyalty_bonuses": 1123, "loyalty_bonuses_to_next_level": 1877, "gender": "m", "location": "NY", "first_name": "John", "last_name": "Doe", "age": 31, "birthday": "1990-03-11", "bought_something": true, "email_bulk": true, "email_chain": true, "email_transactional": true, "sms_bulk": true, "sms_chain": true, "sms_transactional": true, "auto": [ { "brand": "Nissan", "model": "Qashqai", "vds": "TM7N243E4G0BJG978" }, { "brand": "Toyota", "model": "Corolla", "vds": "987655431" } ], "kids": [ { "birthday": "2015-07-28", "gender": "f" }, { "birthday": "2001-04-12", "gender": "m" } ], "custom_string_property": "the string value of the custom property", "custom_integer_property": 100500, "custom_float_property": 7.62, "custom_array_of_string_property": ["value1","value2","value3"], "custom_json_property": {"key1":"value1","key2":"value2","key3":"value3"}, "custom_date_property": "2021-12-31 23:55:00" } ] }
Page Navigation
Related Pages
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
- No labels