Initialization (REST API)
- Andrey Veprikov
This part describes how to get and use the required identifiers.
Request
Endpoint | Request Type |
---|---|
https://api.personaclick.com/init | GET |
Parameters
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account >Â Settings > Store Settings |
did | string | required if previously received | Unique Device ID. See the API response below. |
seance | string | required if previously received within the current user session | Unique ID of the current user session. See the API response below. |
referer | string | optionally | Request source URL |
tz | number | optionally | The time zone of the current user |
stream | string | optionally | Data stream code. Alphanumeric string (letters, numbers only). Max length: 16. The empty default value will mean "web". Can be "ios", "android" or any other string. Used to distinguish between mobile apps, websites, and other events sources. |
testmode | boolean | optionally | Allows adding JS snippets that are in test mode status to the API response. See the API response below. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | Authentication was successful. |
403 Forbidden | Authentication failed. |
API Response Data
Name | Type | Description |
---|---|---|
did | string | The unique ID of the current device. When received, the device ID must be stored on your side or the user's device (in local storage or cookies) and must be used in the future for all requests that require it as a required parameter. Don't request a new Device ID if it has been requested before and is available. |
seance | string | Unique ID of the current user session. When received, the Session ID must be stored on your side or the user's device (in local storage or cookies) and must be used in all queries requiring it as a required parameter. You need to request a new Session ID every time the user starts a new session or if the ID has been lost for some reason. |
snippets | Object Array | Array with JavaScript snippets. Located there: Account > Shared content > JS-snippets Each object in the array contains properties:
|
auto_css_recommender | boolean | Reserved for the JS SDK internal use |
cms | string | Reserved for the JS SDK internal use |
currency | string | Reserved for the JS SDK internal use |
email_collector | boolean | Reserved for the JS SDK internal use |
has_email | boolean | Reserved for the JS SDK internal use |
popup | Object | Reserved for the JS SDK internal use |
recommendations | boolean | Reserved for the JS SDK internal use |
search | Object | Reserved for the JS SDK internal use |
vioce | boolean | Reserved for the JS SDK internal use |
web_push_settings | Object | Reserved for the JS SDK internal use |
Request Examples
For the first request for the Device ID and User Session ID.
curl 'https://api.personaclick.com/init?shop_id=0d42fd8b713d0752776ca589cc0056'
To update a user's Session ID.
curl 'https://api.personaclick.com/init?shop_id=0d42fd8b713d0752776ca589cc0056&did=7rjVGhMykT'
Full example when all IDs have already been received.
curl 'https://api.personaclick.com/init?did=7rjVGhMykT&shop_id=0d42fd8b713d0752776ca589cc0056&referer=https%3A%2F%2Fmystore.com%2F&seance=R5eQXkrKCf&tz=3&testmode=true'
Page Navigation
Related Pages
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
Copyright 2018-2024 PersonaClick