Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
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.
| ||
seance | string | Unique ID of the current user session.
| ||
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.
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/init?shop_id=0d42fd8b713d0752776ca589cc0056' |
To update a user's Session ID.
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/init?shop_id=0d42fd8b713d0752776ca589cc0056&did=7rjVGhMykT' |
Full example when all IDs have already been received.
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/init?did=7rjVGhMykT&shop_id=0d42fd8b713d0752776ca589cc0056&referer=https%3A%2F%2Fmystore.com%2F&seance=R5eQXkrKCf&tz=3&testmode=true' |
Column | ||||
---|---|---|---|---|
Page Navigation
|
Related Pages
|