Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Get Product List

Method Objective

The method allows getting a list of products in stock.

Request

EndpointRequest Type
https://api.personaclick.com/productsGET

Parameters

NameTypeRequirementDescription
shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
didstringoptionallyUnique Device ID. See "Initialization (REST API)" for information about getting and using Device ID.
seancestringoptionallyUnique ID of the current user session. See "Initialization (REST API)" for information about getting and using User Session ID.
limitnumberoptionallyThe maximum number of products in the API response (by default - 10).
pagenumberoptionallyPage number (first page - 1, by default - 1).
categoriesstringoptionallyComma-separated category IDs. If used, the API response will return only those products that are in the specified categories.
locationsstringoptionallyComma-separated location IDs. If used, the API will return only products available in the specified locations. Locations must be specified in the imported product catalog (XML, HTTP API).
brandsstringoptionallyComma-separated vendor names. If used, the API response will return only the products of the listed vendors. The vendors must be listed in the product feed.
filtersstringoptionally

JSON string with the properties and their values that the products should match in the API response. The data matches the values of the "param" parameter of the product feed/catalog (XML, HTTP API). Format:

Code Block
{"property1":["value1","value2"],"property2":["value1","value2"]}

See the example below.

collapsebooleanoptionallyAllows disabling grouping of products by "group_id". This param's "false" value enables the API to return products regardless of a group. The "true" value is only one product of a group. The default value is "true".

API Response Code

HTTP status code

Description
200 OK

The request was successful

403 ForbiddenIncorrect store ID value

API Response Data

NameTypeDescription
productsarray

An array of objects with product information. Each object has the following properties:

  • barcode – product barcode, if it was imported in the product catalog (type: string)
  • brand – product vendor (type: string)
  • categories – an Object array with details of the product category hierarchy, where each object has properties:
    "id" – category ID (type: string)
    "level" – сategory level in the hierarchy (type: string)
    "name" – category name (type: string)
    "name_with_parent" – string name from the name of the parent and main product categories, separated by a "-" (type: string)
    "parent_id" – parent category ID (type: string)
    "url" – category page url (type: string)
  • category_ids – an array of IDs of the product category hierarchy (type: String array)
  • currency – product currency (type: string, matches the currency of the PersonaClick account, or the user value set in the settings of the PersonaClick account)
  • discount – the percentage difference between the old price and the current price (type: number)
  • discount_formatted – the percentage difference between the old and the current price that is formatted as a string with the "%" symbol (type: string)
  • group_id – product group ID (type: string)
  • id – product ID (type: string)
  • image_url – URL of the original product image (type: string)
  • image_url_handle – relative URL of the original product image (type: string)
  • image_url_resized – the object with the URLs of the resize product image. Available object keys matching the size of the image in pixels: 120, 140, 160, 180, 200, 220, 310, 520 (type: object)
  • is_new – new arrival product (type: boolean). See the parameter in the product catalog import (XML, HTTP API)
  • leftovers – rough number of the products left in stock. Available values are: 
    "one" - one product
    "few" - 2-10 products
    "lot" - over 10 products
  • model –  model and product name (type: string)
  • name – product name (type: string)
  • oldprice – integer old price of the product (type: number)
  • oldprice_formatted – formatted integer old price of the product, including currency (type: string)
  • oldprice_full – old price of the product (type: number)
  • oldprice_full_formatted – formatted old price of the product, including currency (type: string)
  • params – object array with pairs of "key" (type: string), "values" (type: array) properties. The data matches the values of the "param" parameter of the product feed/catalog (XML, HTTP API).
  • picture – link to the product image in the PersonaClick image repository (type: string)
  • price – integer current price of the product (type: number)
  • price_formatted – formatted integer current price of the product, including currency (type: string)
  • price_full – current price of the product (type: number)
  • price_full_formatted – formatted current price of the product, including currency (type: string)
  • rating – product rating (type: number)
  • relative_sales_rate – level of sales of current product ( in percentage) in relation to the maximum level of sales of products in the store (type: number)
  • sales_rate – level of product sales (absolute value) (type: number)
  • url – product page URL (type: string)
  • url_handle - relative product page URL (type: string)
products_totalnumberThe total number of products. The following request parameters don't affect this value: page, limit.
brandsObject array

An array of objects with information about available brands. Each object has the following properties:

  • name – brand name (type: string)
  • count – total number of brand products (type: number)
filtersObject

JSON string with properties and their values of all API response products. The data matches the values of the "param" parameter of the product feed/catalog (XML, HTTP API). Format:

Code Block
{"property1":["value1","value2"],"property2":["value1","value2"]}


price_rangeObject

The object containing the values of the minimum and maximum price of the products in the API response. Available properties:

  • min - minimum price
  • max - maximum price

Request Example

Code Block
languagejs
themeFadeToGrey
#Basic
curl https://api.personaclick.com/products?shop_id=0d42fd8b713d0752776ca589cc0056

#Using a profile device ID and seance ID
curl https://api.personaclick.com/products?shop_id=0d42fd8b713d0752776ca589cc0056&did=7rjVGhMykT&seance=R5eQXkrKCf

#Filter by brands
curl https://api.personaclick.com/products?shop_id=0d42fd8b713d0752776ca589cc0056&brands=BRAND_1,BRAND_2

#Filter by categories
curl https://api.personaclick.com/products?shop_id=0d42fd8b713d0752776ca589cc0056&categories=CATEGORY_1,CATEGORY_2

# Filter by locations
curl https://api.personaclick.com/products?shop_id=0d42fd8b713d0752776ca589cc0056&locations=LOCATION_1,LOCATION_2

# Filter by params
curl https://api.personaclick.com/products?shop_id=0d42fd8b713d0752776ca589cc0056&filters={"PARAM_NAME_1": ["PARAM_VALUE_1", "PARAM_VALUE_2"], "PARAM_NAME_2": ["PARAM_VALUE_1", "PARAM_VALUE_2"]}

# Filter by boolean params (boolean as string)
curl https://api.personaclick.com/products?shop_id=0d42fd8b713d0752776ca589cc0056&filters={"PARAM_NAME_1": ["true"], "PARAM_NAME_2": ["false"]}


Get Product Details

Method Objective

The method allows getting product details.

Request

EndpointRequest Type
https://api.personaclick.com/products/getGET

Parameters

NameTypeRequirementDescription
shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
item_idstringrequiredProduct ID

API Response Code

HTTP status code

Description
200 OK

The request was successful

403 ForbiddenIncorrect store ID value

API Response Data

NameTypeDescription
productsarray

An array of objects with product information. Each object has the following properties:

  • barcode – product barcode, if it was imported in the product catalog (type: string)
  • brand – product vendor (type: string)
  • categories – an Object array with details of the product category hierarchy, where each object has properties:
    "id" – category ID (type: string)
    "level" – сategory level in the hierarchy (type: string)
    "name" – category name (type: string)
    "name_with_parent" – string name from the name of the parent and main product categories, separated by a "-" (type: string)
    "parent_id" – parent category ID (type: string)
    "url" – category page url (type: string)
  • category_ids – an array of IDs of the product category hierarchy (type: String array)
  • currency – product currency (type: string, matches the currency of the PersonaClick account, or the user value set in the settings of the PersonaClick account)
  • discount – if the product has an old price (type: boolean)
  • group_id – product group ID (type: string)
  • is_available – product availability status (type: boolean)
  • model –  model and product name (type: string)
  • name – product name (type: string)
  • oldprice – integer old price of the product (type: number)
  • params – object array with pairs of "key" (type: string), "values" (type: array) properties. The data matches the values of the "param" parameter of the product feed/catalog (XML, HTTP API).
  • picture – link to the product image in the PersonaClick image repository (type: string)
  • price – integer current price of the product (type: number)
  • uniqid – product ID (type: string)
  • url – product page URL (type: string)

Request Example

Code Block
languagejs
themeFadeToGrey
curl https://api.personaclick.com/products/get?shop_id=0d42fd8b713d0752776ca589cc0056&item_id=100500


Get Product Counters

Method Objective

The method allows getting 24-hour and 15-minute counters of interaction with a product.

Request

EndpointRequest Type
https://api.personaclick.com/products/countersGET

Parameters

NameTypeRequirementDescription
shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
itemstringrequiredProduct ID

API Response Code

HTTP status code

Description
200 OK

The request was successful.

400 Bad RequestSee the "message" property of the API response for details.
403 ForbiddenSee the "message" property of the API response for details.

API Response Data

NameTypeDescription
nowobject

The product interaction counters for the last 15 minutes. 

The following properties are available:

  • view (number) - the number of product views
  • cart (number) - the number of times product is added to the cart
  • purchase (number) - the number of product purchases
dailyobject

The product interaction counters for the last 24 hours. 

The following properties are available:

  • view (number) - the number of product views
  • cart (number) - the number of times product is added to the cart
  • purchase (number) - the number of product purchases
statusstring

Available only in case of an error. Contains the "error" value in this case.

messagestring

Available only in case of an error. Contains a description of the error.

Request Example

Code Block
languagejs
themeFadeToGrey
curl 'https://api.personaclick.com/products/counters?shop_id=0d42fd8b713d0752776ca589cc0056&item=100500


Get Category Product List

Method Objective

The method allows getting a list of products in stock for a specified category.

Note

This method has a 60-second cache if no or empty “filters” parameter is used in the request.

Request

EndpointRequest Type
https://api.personaclick.com/category/CATEGORY_ID
GET

Parameters

NameTypeRequirementDescription
CATEGORY_IDstringrequiredCategory ID
shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
didstringoptionallyUnique Device ID. See "Initialization (REST API)" for information about getting and using Device ID.
seancestringoptionallyUnique ID of the current user session. See "Initialization (REST API)" for information about getting and using User Session ID.
limitnumberoptionallyThe maximum number of products in the API response (by default - 10).
pagenumberoptionallyPage number (first page - 1, by default - 1).
locationsstringoptionallyComma-separated location IDs. If used, the API will return only products available in the specified locations. Locations must be specified in the imported product catalog (XML, HTTP API).
brandsstringoptionallyComma-separated vendor names. If used, the API response will return only the products of the listed vendors. The vendors must be listed in the product feed.
filtersstringoptionally

JSON string with the properties and their values that the products should match in the API response. The data matches the values of the "param" parameter of the product feed/catalog (XML, HTTP API). Format:

Code Block
{"property1":["value1","value2"],"property2":["value1","value2"]}

See the example below.

collapsebooleanoptionallyAllows disabling grouping of products by "group_id". This param's "false" value enables the API to return products regardless of a group. The "true" value is only one product of a group. The default value is "true".

API Response Code

HTTP status code

Description
200 OK

The request was successful

403 ForbiddenIncorrect store ID value

API Response Data

NameTypeDescription
productsarray

An array of objects with product information. Each object has the following properties:

  • barcode – product barcode, if it was imported in the product catalog (type: string)
  • brand – product vendor (type: string)
  • categories – an Object array with details of the product category hierarchy, where each object has properties:
    "id" – category ID (type: string)
    "level" – сategory level in the hierarchy (type: string)
    "name" – category name (type: string)
    "name_with_parent" – string name from the name of the parent and main product categories, separated by a "-" (type: string)
    "parent_id" – parent category ID (type: string)
    "url" – category page url (type: string)
  • category_ids – an array of IDs of the product category hierarchy (type: String array)
  • currency – product currency (type: string, matches the currency of the PersonaClick account, or the user value set in the settings of the PersonaClick account)
  • discount – the percentage difference between the old price and the current price (type: number)
  • discount_formatted – the percentage difference between the old and the current price that is formatted as a string with the "%" symbol (type: string)
  • group_id – product group ID (type: string)
  • id – product ID (type: string)
  • image_url – URL of the original product image (type: string)
  • image_url_handle – relative URL of the original product image (type: string)
  • image_url_resized – the object with the URLs of the resize product image. Available object keys matching the size of the image in pixels: 120, 140, 160, 180, 200, 220, 310, 520 (type: object)
  • is_new – new arrival product (type: boolean). See the parameter in the product catalog import (XML, HTTP API)
  • leftovers – rough number of the products left in stock. Available values are: 
    "one" - one product
    "few" - 2-10 products
    "lot" - over 10 products
  • model –  model and product name (type: string)
  • name – product name (type: string)
  • oldprice – integer old price of the product (type: number)
  • oldprice_formatted – formatted integer old price of the product, including currency (type: string)
  • oldprice_full – old price of the product (type: number)
  • oldprice_full_formatted – formatted old price of the product, including currency (type: string)
  • params – object array with pairs of "key" (type: string), "values" (type: array) properties. The data matches the values of the "param" parameter of the product feed/catalog (XML, HTTP API).
  • picture – link to the product image in the PersonaClick image repository (type: string)
  • price – integer current price of the product (type: number)
  • price_formatted – formatted integer current price of the product, including currency (type: string)
  • price_full – current price of the product (type: number)
  • price_full_formatted – formatted current price of the product, including currency (type: string)
  • rating – product rating (type: number)
  • relative_sales_rate – level of sales of current product ( in percentage) in relation to the maximum level of sales of products in the store (type: number)
  • sales_rate – level of product sales (absolute value) (type: number)
  • url – product page URL (type: string)
  • url_handle - relative product page URL (type: string)
products_totalnumberThe total number of products. The following request parameters don't affect this value: page, limit.
brandsObject array

An array of objects with information about available brands. Each object has the following properties:

  • name – brand name (type: string)
  • count – total number of brand products (type: number)
filtersObject

JSON string with properties and their values of all API response products. The data matches the values of the "param" parameter of the product feed/catalog (XML, HTTP API). Format:

Code Block
{"property1":["value1","value2"],"property2":["value1","value2"]}


price_rangeObject

The object containing the values of the minimum and maximum price of the products in the API response. Available properties:

  • min - minimum price
  • max - maximum price

Request Example

Code Block
languagejs
themeFadeToGrey
#Basic
curl https://api.personaclick.com/category/100500?shop_id=0d42fd8b713d0752776ca589cc0056

#Using a profile device ID and seance ID
curl https://api.personaclick.com/category/100500?shop_id=0d42fd8b713d0752776ca589cc0056&did=7rjVGhMykT&seance=R5eQXkrKCf

#Filter by brands
curl https://api.personaclick.com/category/100500?shop_id=0d42fd8b713d0752776ca589cc0056&brands=BRAND_1,BRAND_2

# Filter by locations
curl https://api.personaclick.com/category/100500?shop_id=0d42fd8b713d0752776ca589cc0056&locations=LOCATION_1,LOCATION_2

# Filter by params
curl https://api.personaclick.com/category/100500?shop_id=0d42fd8b713d0752776ca589cc0056&filters={"PARAM_NAME_1": ["PARAM_VALUE_1", "PARAM_VALUE_2"], "PARAM_NAME_2": ["PARAM_VALUE_1", "PARAM_VALUE_2"]}

# Filter by boolean params (boolean as string)
curl https://api.personaclick.com/category/100500?shop_id=0d42fd8b713d0752776ca589cc0056&filters={"PARAM_NAME_1": ["true"], "PARAM_NAME_2": ["false"]}


Get User's Current Cart

Method Objective

The method allows getting the current profile's cart.

Request

EndpointRequest Type
https://api.personaclick.com/products/cartGET

Parameters

NameTypeRequirementDescription
shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
didstringoptionallyUnique Device ID. See "Initialization (REST API)" for information about getting and using Device ID.

API Response Code

HTTP status code

Description
200 OK

The request was successful

403 ForbiddenIncorrect store ID value
404 Not foundProfile not found.

API Response Data

NameTypeDescription
statusarrayContains "success" if the request is successful.
dataobject

Contains the "items" object array, where each object contains the following properties:

  • uniqid - product ID
  • quantity - product quantity

Request Example

Code Block
languagejs
themeFadeToGrey
curl https://api.personaclick.com/products/cart?did=zXMNgW9p7W&shop_id=0d42fd8b713d0752776ca589cc0056



Column

Page Navigation

Table of Contents
maxLevel1
indent0px
stylenone




Related Pages

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
cqllabel = "product_counters"