Skip to main content

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
danger

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.

ParameterRequirementDescription
shop_idRequiredYour 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_secretRequiredYour 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.
itemsRequiredA list of product items. Each product object contains the following:
  • id: String (max 64). A unique ID for the item. This field is required.
  • group_id: String (max 64). The ID of the item group. This field is optional.
  • name: String (max 255). The name of the item. This field is required.
  • price: Float (positive value). The price of the item. To provide prices in multiple locations, use the locations object instead. This field is optional.
  • oldprice: Float (positive value). The previous price of the item. This field is optional.
  • currency: String. The currency in which the price field was specified. This field is required.
  • url: String. A URL to associate with the item. This field is required.
  • picture: String. A URL containing an image of the item. This field is required.
  • available: Boolean. Indicates whether the item is available for purchase. Use the update products endpoint to update this later. This field is required.
  • categories: Array of Strings. Each string represents a category ID that this product belongs to. This field is required.
  • locations: Array of prices of the item in different locations. See the locations object for details. This field is optional.
  • accessories; Array of Strings. Contains the product IDs of related accessories for the item. This field is optional.
  • seasonality: Array of Integers. Represents the months of the year (January=1, December=12) that you want to promote this item. This field is optional.
  • brand: String. The brand name of the item. This field is optional.
  • barcode: String. A barcode value for the item. This field is optional.
  • price_margin: Integer. The price margin for the item. This field is optional.
  • tags: Array of Strings. A list of keywords that you want to associate with the item. This field is optional.
  • is_child: Boolean. Indicates whether this item is a child of another item. This field is optional.
  • is_fashion: Boolean. Indicates whether this item is a fashion item. This field is optional.
  • is_new: Boolean. Indicates whether this item is a new item. This field is optional.
  • fashion: Object. Defines several additional parameters for fashion items. See fashion object for details.
  • stock_quantity: Int. The quanity of the item in stock. This field is optional.
  • type_prefix: String. A prefix to distinguish the type of item. This field is optional.
  • model: String. The model name of the item. This field is optional.
  • params: Object. Add custom parameters. See the params object for details. This field is optional.
  • merchant: String. The merchant you want to associate with the item. This field is optional.
  • rating: Integer (1-5). The user rating you want to assign to the item. This field is optional.
  • leftovers: String. A description of amount the stock "left". For example, ""one", "few", or "lots". This field is optional.
  • creation_date: String (Format: yyyy-mm-dd) The date the item was created. This field is optional.

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.

ParameterTypeRequirementDescription
locationStringRequiredThe location you want to specify a price for. This field is required if the locations field is provided.
priceFloat (positive value)OptionalThe price at this location.
oldpriceFloat (positive value)OptionalThe previous price of the item (for example, the regular price of a sale item).
stock_quantityInt (positive value)OptionalThe quantity of the item in stock.
sizesArray of StringsOptionalA list of size options for the item.
weightInt (positive)OptionalThe weight of the item.
delivery_typesObjectOptionalIndicates the availability of the item containing the following values:
  • store: Int (positive). Number of items available in store.
  • delivery: Int (positive). Number of items available for delivery.
  • delivery: Int (positive). Number of items available in the warehouse.

Params object

The params object allows you to specify custom parameter values for the item. Pass the params object inside the product items object.

ParameterTypeRequirementDescription
nameStringRequiredThe name of the parameter
valueArray of StringsRequiredArray of values for the parameter
unitStringOptionalUnit 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.

ParameterTypeRequirementDescription
genderStringOptionalA gender to associate with the item. For example, "m", "f", or "female".
sizesArray of StringsOptionalList of sizes for the item.
typeStringRequiredThe 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,
}