Import and update products
This endpoint imports your products into your Kameleoon account. You can also use this method to update the list of products and their properties.
The data is sent as a JSON string in the body of the request.
Rate limit
- The API request limit (Rate Limit) is set at 40 requests per minute.
- The API request weight limit (Weight Limit) is capped at 35 megabytes per request.
HTTP Request
PUT https://api.products.kameleoon.com/import/products
You must specify all of the parameter values with each request. That is, you can't update a subset of the items to update only those items. Any unspecified items are deleted from the server.
Product object
The product object is the main JSON element used in this endpoint. The items object can contain three child objects that are documented separately. These include the locations object, the params object, and the fashion object.
Parameter | Requirement | Description |
---|---|---|
shop_id | Required | Your Store Key. You can find this in Recommendations > Settings > Store settings in the Kameleoon app. You can also contact your Customer Success Manager for the key. |
shop_secret | Required | Your Secret Key. You can find this in Recommendations > Settings > Store settings in the Kameleoon app. You can also contact your Customer Success Manager for the key. |
items | Required | A list of product items. Each product object contains the following:
|
Locations object
Use the locations object to provide price, inventory, and other location-specific information when you have multiple locations. Pass the locations object inside the product items object.
Parameter | Type | Requirement | Description |
---|---|---|---|
location | String | Required | The location you want to specify a price for. This field is required if the locations field is provided. |
price | Float (positive value) | Optional | The price at this location. |
oldprice | Float (positive value) | Optional | The previous price of the item (for example, the regular price of a sale item). |
stock_quantity | Int (positive value) | Optional | The quantity of the item in stock. |
sizes | Array of Strings | Optional | A list of size options for the item. |
weight | Int (positive) | Optional | The weight of the item. |
delivery_types | Object | Optional | Indicates the availability of the item containing the following values:
|
Params object
The params object allows you to specify custom parameter values for the item. Pass the params object inside the product items object.
Parameter | Type | Requirement | Description |
---|---|---|---|
name | String | Required | The name of the parameter |
value | Array of Strings | Required | Array of values for the parameter |
unit | String | Optional | Unit of measurement for the values. |
Fashion object
The fashion object allows you to specify additional information about fashion items. Pass the fashion object inside the product items object.
Parameter | Type | Requirement | Description |
---|---|---|---|
gender | String | Optional | A gender to associate with the item. For example, "m", "f", or "female". |
sizes | Array of Strings | Optional | List of sizes for the item. |
type | String | Required | The type of fashion item. For example, "jacket". |
Example JSON request
{
"id": "myID", // String (max 64). Required
"group_id": "myGroup", // String (max 64). Optional
"name": "myItem", // String (max 255). Required
"price": "1", // Float (positive). Required
"oldprice": "2", // Float (positive). Optional
"currency": "USD", // Currency code: USD, EUR. Required.
"url": "https://example.com/product", // String (URL). Required
"picture": "https://example.com/product/image.png", // String (URL). Required
"available": true, // Boolean (true, false). Required
"categories": ["ID1", "ID2", ...], // Array of categories IDs. Required.
"locations": [
{
"location": "USA",
"delivery_types": {
"store": 10,
"stock": 50 }
},
{
"location": "CAN",
"price": 60
}
], // Array of prices in locations. See below. Optional
"accessories": ["ID", "ID", ...], // Array of product IDs. Optional
"seasonality": [1, 2, ...], // Array of integers (months: 1-12). Optional
"brand": "...", // String. Optional
"barcode": "...", // String. Optional
"price_margin": "...",// Integer. Optional
"tags": ["TAG1", "TAG2", ...], // Array of strings. Optional
"is_child": false, // Boolean (true, false). Optional
"is_fashion": true, // Boolean (true, false). Optional
"is_new": false, // Boolean (true, false). Optional
"fashion": {
"gender": "m",
"sizes": ["48", "50", "52"],
"type": "jacket"
}, // Object. See below. Optional
"stock_quantity": 60, // Int (positive). Optional
"type_prefix": "...", // String. Optional
"model": "Widget 3000", // String. Optional
"params": [
{
"name": "Param 1",
"value": ["bluetooth", "wi-fi"]
},
{
"name": "Param 2",
"value": [23]
}
], // Array of params data. See below. Optional
"merchant": "...", // String. Optional
"rating": 4, // Integer (1-5). Optional
"leftovers": "many", // String (one, few, lot). Optional
"creation_date": "...", // String. Optional. Format yyyy-mm-dd,
}