Example of Product API request body

Description

If the online store does not contain group products, then you need to call the productAPI request on the product card pages and transmit all information about the product to it.

If integration requires support for group products, you need to call the productsGroupAPI request.

Important: If the website/mobile application contains the functionality of a quick product view window, then the request must also be sent when this window is opened.

Example of the ProductAPI request body

{
  "id": <product ID>,
  "name": "Example product name",
  "price": 777,
  "pictureUrl": "http://example.com/path/to/Photo.jpg",
  "url": "http://www.example.com/path/to/productPage",
  "isAvailable": true,
  "categoryPaths": ["Women/Clothes/Skirts","Women/New Arrivals"],
  "description": "Some text description",
  "vendor": "Brand name",
  "model": "Model name",
  "typePrefix": "Product type",
  "oldPrice": 999,
  "params": {
    "<custom parameter 1 name>":  "<custom parameter 1 value>",
    "<custom parameter 2 name>":  "<custom parameter 2 value>",
    "<custom parameter N name>":  "<custom parameter N value>"
  }
 }
{
  "groupId": <group ID>,
  "name": "<string>",
  "price": 777,
  "pictureUrl": "http://example.com/path/to/Photo.jpg",
  "url": "http://www.example.com/path/to/productPage",
  "isAvailable": true,			
  "categoryPaths": ["Example/Category/Path","Another/Category"],
  "description": "Some text description",
  "products": {
		"<product id>": {
      "isAvailable": <bool>,
      "name": "<string>",
      "color": "<string>",
      "size": "<string>",
      "url": "<string>",
      "pictureUrl": "<string>",
      "price": <decimal>,
      "oldPrice": <decimal>,
      "description": "<string>",
      "params": {
        "<custom parameter 1 name>": "<custom parameter 1 value>",
        "<custom parameter 2 name>": "<custom parameter 2 value>",
        "<custom parameter N name>": "<custom parameter N value>"
      }	
  	},
	  "<product id>": {
      "isAvailable": <bool>,
      "name": "<string>",
      "color": "<string>",
      "size": "<string>",
      "url": "<string>",
      "pictureUrl": "<string>",
      "price": <decimal>,
      "oldPrice": <decimal>,
      "description": "<string>",
      "params": {
        "<custom parameter 1 name>": "<custom parameter 1 value>",
        "<custom parameter 2 name>": "<custom parameter 2 value>",
        "<custom parameter N name>": "<custom parameter N value>"
      }	
    }
  },
  "vendor": "Brand name",
  "model": "Model name",
  "typePrefix": "Product type",
  "oldPrice": 999		
}

Required parameters of the Product API without group products

ParameterTypeDescription
idintegerUnique product identifier. This attribute can only contain numbers. The maximum length of the identifier is 16 characters. The id value must not exceed 9 007 199 254 740 991.
namestringProduct name (no more than 120 characters). We recommend specifying the full unique name of the product as the product name.
pricenumberThe price per unit of goods, should not be equal to zero.
urlstringAbsolute link to the product page. The maximum length of the URL is 512 characters.
pictureUrlstringAbsolute link to the product offer image. The images located on these URLs must be jpeg, gif or png. To ensure proper image processing, the recommended size is 400x400 pixels or less than 1 MB. The maximum length of the URL is 512 characters.
isAvailableboolOffer availability status:
true - Offer is available.
false - Offer is unavailable.
Please note, that this parameter is case sensitive. true and True are identified as different valued. Specify the value with a small letter.
categoryPathsstringThe array that specify the paths of product categories categories.
The category path should accurately display the structure of the website menu and category nesing (we recommend using static names of categories and not using url of the paths, filters and dinamic breadcrumbs)

You need to pass paths only to the lowest-level categories: if the product is in the categories "Women/Clothing/Skirts" and "Women/Clothes", it is necessary to pass only one way - "Women/Clothes/Skirts". If the product is in several categories, then you need to separate them with commas, for example ["Women/Clothing/Skirts","Women/Clothing/Velour"]. Must be the same for one product

Required parameters of the Product API with group products

ParameterTypeDescription
productsJSON objectThis parameter should contain all of the parameters in the group, that are defined as separate objects.
The only required paramter for the product is isAvailable.By default, the remaining parameters, such as name/URL/image, will be pulled from the general declaration of the group parameters.
groupIdintegerID of the product group. Combines all offers that are variations of the same model. Must have the same value. The value must be an integer. If the product is not a group offer, then the identifier of the product offer must be passed to the parameter.

Additional parameters

ParameterTypeDescription
vendorstringProduct brand or vendor. The parameter is used for recommendations based on vendor (popular by vendor)
oldPricenumberOld price of the product. Can be used to calculate and show the discount in recommendations
paramsJSON objectThe parameter is used for defining product specifications. Each parameter is described by separate element in params object.
Params can contain 40 elements.
The element is defined as "":"", where:

- parameter name.
- value of parameter, can contain object. The values, that are passed into params element can be used for additional filtering of product recommendations.
Additional parameters participate in recommendations forming and can be used to show custom labels on product cards.

Parameter for multi-regional support

ParameterTypeDescription
stockIdstringRegion, warehouse, or language of user. The parameter is used for processing multiple warehouses that may have different prices and availability of goods in different regions or countries (in the case of different languages, currencies, etc.). Each region / stockID must have at least 5 times more unique visitors per month than the number of goods in region / stockID. For example, if there are 10,000 products in a region, then the traffic for in this region should be at least 50,000 unique users per month.

Multi-languages and multi-currencies support

If the website supports a choice of several languages and/or currencies, then with the help of additional parameters it is possible to implement support for the same functionality in Retail Rocket products.

{
  "id": <product ID>,
  "name": "Example product name",
  "price": 777,
  "pictureUrl": "http://example.com/path/to/Photo.jpg",
  "url": "http://www.example.com/path/to/productPage",
  "isAvailable": true,
  "categoryPaths": ["Women/Clothes/Skirts","Women/New Arrivals"],
  "description": "Some text description",
  "vendor": "Brand name",
  "model": "Model name",
  "typePrefix": "Product type",
  "oldPrice": 999,
  "params": {
     "<custom parameter 1 name>": "<custom parameter 1 value>",
     "<custom parameter 2 name>": "<custom parameter 2 value>",
     "<custom parameter N name>": "<custom parameter N value>",
     "languages": {
       "<language1>": {
         "description": "description in language1",
         "name": "name in language1",
         "url": "url to product in specific language",
         "<custom parameter 1 name in language1>": "<custom parameter 1 value>",
         "<custom parameter 2 name in language1>": "<custom parameter 2 value>",
         "<custom parameter N name in language1>": "<custom parameter N value>"
       },
       "<language2>": {
         "description": "description in language2",
         "name": "name in language2",
         "url": "url to product in specific language",
         "<custom parameter 1 name in language2>": "<custom parameter 1 value>",
         "<custom parameter 2 name in language2>": "<custom parameter 2 value>",
         "<custom parameter N name in language2>": "<custom parameter N value>"
       }
     },
     "currencies": {
       "EUR": <price in EUR>,
       "USD": <price in USD>
     }
   }
}