Skip to main content

Identifier Attribute

In Sailplay, it is possible to specify additional client identifiers and use them during integration when sending API requests.

The following can be used as such identifiers, for example:

  • website cookies;
  • secondary phone number;
  • secondary email;
  • session ID;
  • external ID from CRM, etc.

Using Attributes as Identifiers

All existing Sailplay API methods that accept standard client identifiers (user_phone, email, origin_user_id) can also accept identifier attributes.

To do this, instead of standard parameters, special fields depending on the method type must be passed.


Client Creation

For the client creation method, the following parameters are used:

  • id_field — the technical name of the attribute;
  • id_value — the value of the attribute.
users/add
curl --request POST   --url https://api.sailplay.net/api/v2/users/add/   --header 'Content-Type: application/x-www-form-urlencoded'   --data token=***   --data store_department_id=***   --data id_field=visitor_id   --data id_value=1181142583

Other Client Interaction Methods

For all other client-related methods, the following parameters are used:

  • identification — the technical name of the attribute;
  • lookup — the value of the attribute.
users/tags/add
curl --request POST   --url https://api.sailplay.net/api/v2/users/tags/add/   --header 'Accept: application/json'   --header 'Content-Type: application/x-www-form-urlencoded'   --data token=***   --data store_department_id=***   --data identification=visitor_id   --data lookup=1181142583   --data 'tags=NewVisit'

Data Types

All identification parameters (id_field, id_value, identification, lookup) are of type string.