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 5 Next »

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.

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

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_transactionalbooleanSubscribe user to email transactional campaigns.
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_transactionalbooleanSubscribe user to SMS transactional campaigns.
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.

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"
        }
      ]
    }
  ]
}
  • No labels