Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Getting New Device ID
This part describes how to import product categories into PersonaClick using HTTP API import.
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 |
Example Request
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/init?shop_id=0d42fd8b713d0752776ca589cc0056' |
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' |
Import Locations
This part describes how to import store locations into PersonaClick using HTTP API import.
Request
API Response
HTTP status code
Authentication was successful. The data was accepted and queued for processing in the background.
Note |
---|
If the data processing fails, the account owner and employees authorized to receive technical notifications will be sent an email describing the error. |
Request Data Syntax
Code Block | ||||
---|---|---|---|---|
| ||||
{
shop_id: "...",
shop_secret: "...",
locations: [location, location, ...]
} |
Location Object
Example of Categories Request
Code Block | ||||
---|---|---|---|---|
| ||||
{
shop_id: "eehj3eu84299kg5ghw5a6743r8",
shop_secret: "pmd5362597thrgq8k256ep01t0",
locations: [
{
id: 1,
name: "New York",
parent: null
},
{
id: 2,
name: "Los Angeles",
parent: null
},
{
id: 3,
name: "Brighton Beach",
parent: 1
},
{
id: 4,
name: "Beverly Hills",
parent: 2
}
]
} |
Requests for Import and Update
This part describes how to import products into PersonaClick using HTTP API import.Requests
Tip |
---|
In the situation lacking a technical feasibility to send PUT request, use POST requests and add to the JSON-body a variable method with the corresponding value in the upper case: PUT. |
API Response
HTTP status code
Authentication was successful. The data was accepted and queued for processing in the background.
Note |
---|
If the data processing fails, the account owner and employees authorized to receive technical notifications will be sent an email describing the error. |
Request Data Syntax
Product Object
Fashion Object
Code Block | ||||
---|---|---|---|---|
| ||||
{
gender: "m",
sizes: ["XS", "S", "L"], // "M" and "XL" sizes aren't available
type: "shoe",
colors: [
{
color: "blue",
picture: "https://examplestore.com/product/100500/images/blue.jpg"
},
{
color: "yellow",
picture: "https://examplestore.com/product/100500/images/yellow.jpg"
}
]
} |
Cosmetic Object
Child Object
Book Object
Locations Array
Note |
---|
The "locations" array specifies the product availability status for various cities/towns as well as any alterations in price in these cities/towns. Your default price is used if the price alterations have not been stated in this object. |
Example of Products Request
Code Block | ||||
---|---|---|---|---|
| ||||
{
shop_id: "eehj3eu84299kg5ghw5a6743r8",
shop_secret: "pmd5362597thrgq8k256ep01t0",
items: [
{
id: "6335",
name: "Hoverboard 100500",
price: 1000,
currency: "USD",
url: "https://examplestore.com/products/6335.html",
picture: "https://examplestore.com/pictures/6335.jpg",
available: true,
categories: [14, 3],
barcode: 0123456789,
price_margin: 10,
locations: [
{
location: "New York"
},
{
location: "Los Angeles",
price: 1250,
oldprice: 1500
}
],
brand: "Dr. Emmett Brown",
tags: ["titanium", "steel", "sport"],
is_child: true
},
{
id: 133
name: "red jacket",
price: 200,
currency: "USD",
url: "https://examplestore.com/products/133.html",
picture: "https://examplestore.com/pictures/133.jpg",
available: true,
categories: [33],
locations: [
{
"location": "New York"
}
],
brand: "McFly",
tags: ["winter", "sport"],
is_fashion: true,
fashion: {
gender: "m",
sizes: ["M", "L", "XXL"],
type: "jacket"
}
}
]
}
|
Synchronization Request
Allows synchronizing the availability status of products. All products sent in the request will be marked as in stock, the rest as out of stock.Requests
Tip |
---|
In the situation lacking a technical feasibility to send PATCH request, use POST requests and add to the JSON-body a variable method with the corresponding value in the upper case: PATCH. |
Request Data Syntax
Code Block | ||||
---|---|---|---|---|
| ||||
{
shop_id: "eehj3eu84299kg5ghw5a6743r8",
shop_secret: "pmd5362597thrgq8k256ep01t0",
items: [635, 3373, 75778]
} |
API Response
HTTP status code
Authentication was successful. The data was accepted and queued for processing in the background.
Note |
---|
If the data processing fails, the account owner and employees authorized to receive technical notifications will be sent an email describing the error. |
Deletion Request
Allows marking products in the request as out of stock. The statuses of the other products will remain unchanged.Requests
Tip |
---|
In the situation lacking a technical feasibility to send DELETE request, use POST requests and add to the JSON-body a variable method with the corresponding value in the upper case: DELETE. |
Request Data Syntax
Code Block | ||||
---|---|---|---|---|
| ||||
{
shop_id: "eehj3eu84299kg5ghw5a6743r8",
shop_secret: "pmd5362597thrgq8k256ep01t0",
items: [635, 3373, 75778]
} |
API Response
HTTP status code
Authentication was successful. The data was accepted and queued for processing in the background.
Note |
---|
If the data processing fails, the account owner and employees authorized to receive technical notifications will be sent an email describing the error. |
Table of Contents | ||||
---|---|---|---|---|
|