Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Current »

Method Objective

The method allows importing audiences both in the general list and in a separate segment.

Request

EndpointRequest TypeContent-TypeRate LimitMax Data Size
https://api.personaclick.com/import/audiencePOSTapplication/json40 requests/minute32 MB/request

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
segment_idnumberoptionallyThe ID of the static segment. It's available there: Account > CRM > Segments. If not specified, the audience will be imported into the general list.
audienceArrayrequiredObject array with the imported audience. See the description below.

Audience Object

Main parameters

Name

Type

Description

email  

string

User Email.

This parameter is used as an identifier, so it's required (if the "phone" parameter isn't used).

first_namestringUser First Name.
genderstringUser Gender (m – male, f – female).
idnumber/stringStore side user ID.
last_namestringUser Surname.
phonestring

User phone in full international format.

This parameter is used as an identifier, so it's required (if the "email" parameter isn't used).

A phone number in full international format may begin with a plus sign (+) followed by the country code, city (area) code, and phone number.

Additional parameters

Name

Type

Description

agenumber

User age (in years).

autoObject arrayList of vehicles. See description below.
birthdaystring

User birthday in the format YYYYY-MM-DD.

bought_somethingbooleanThe user has or hasn't ever bought something in the store.
email_bulkbooleanSubscribe user to email bulk campaigns.
email_chainbooleanSubscribe user to email trigger campaigns.
email_transactionalboolean

Subscribe user to email transactional campaigns.

It's recommended that always use the "true" value, even if you don't use transactional messages.

fb_idstringFacebook User ID.
kidsObject arrayUser's children. See description below.
locationstring

The user's current location from the list of locations in the product feed.

loyalty_bonusesnumberThe current number of store bonuses at the user.
loyalty_bonuses_to_next_levelnumberThe number of store bonuses necessary for the user to reach the next loyalty level.
loyalty_card_locationstringThe location (from the list of locations in the product feed) where the user last used the loyalty card.
loyalty_idstringThe Loyalty Program user ID (loyalty card).
loyalty_statusstringThe user's current status in the loyalty program.
sms_bulkbooleanSubscribe user to SMS bulk campaigns.
sms_chainbooleanSubscribe user to SMS trigger campaigns.
sms_transactionalboolean

Subscribe user to SMS transactional campaigns.

It's recommended that always use the "true" value, even if you don't use transactional messages.

telegram_idstringTelegram User ID.
vk_idstringVKontakte User ID.

The "auto" object properties

Name

Type

Description

brandstring

Vehicle Brand.

modelstringVehicle Model.
vdsstring

Vehicle's VDS/VIN.

The "kids" object properties

Name

Type

Description

genderstringChild's age (m – male, f – female).
birthdaystringChild's birthday in the format YYYY-MM-DD.

Custom Properties

NameTypeDescription
A custom property can have any name except the reserved onesstring

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 RequestUnsuccessful 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"
    },
    {
        # the next user's data
    },
    {
        # the next user's data
    }
  ]
}
  • No labels