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.

danger

If you want to update only certain products, you must provide all mandatory parameter values for each product in the request. If any mandatory properties of a product are omitted, the product will be ignored during the import, and no changes will be made in our database. For example, if you want to update only the price of a product, you must include all its mandatory parameters, such as category, name, picture, tags, etc.

For non-mandatory properties, any omitted values will result in those properties being removed from our database.

Rate limit

  • The API request limit (Rate Limit) is set at 40 requests per minute, with a maximum of 1 request every 1.5 seconds.
  • The API request weight limit (Weight Limit) is capped at 35 megabytes per request.

HTTP Request

PUT https://api.products.kameleoon.com/import/products

List of query parameters

ParameterTypeRequiredDescription
shop_idStringYesYour 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_secretStringYesYour 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.
itemsListYesA list of product items. Find in this table the parameters required for items

List of parameters for items object

ParameterTypeRequiredDescription
idString (max length 64)YesA unique ID assigned to the item
group_idString (max length 64)OptionalThe ID associated to the item group
nameString (max length 255)YesThe name of the item
priceFloat (must be positive)YesThe price of the item. To provide prices in multiple locations, use the locations object instead.
oldpriceFloat (must be positive)OptionalThe previous price of the item
currencyStringYesThe currency in which the price field was specified
urlStringYesA URL to associate with the item
pictureStringYesA URL containing an image of the item
availableBooleanYesIndicates whether the item is available for purchase. Use the update products endpoint to update this later
categoriesArray of stringsYesEach string represents a category ID that this product belongs to.
locationsArrayOptionalArray of prices of the item in different locations. Find in this table the parameters required for locations
accessoriesArray of stringsOptionalContains the product IDs of related accessories for the item
seasonalityArray of integersOptionalRepresents the months of the year (January=1, December=12) that you want to promote this item
brandStringOptionalThe brand name of the item
barcodeIntegerOptionalA barcode value for the item
price_marginIntegerOptionalThe price margin for the item
tagsArray of stringsOptionalA list of keywords that you want to associate with the item
is_childBooleanOptionalIndicates whether this item is a child of another item
is_fashionBooleanOptionalIndicates whether this item is a fashion item
is_newBooleanOptionalIndicates whether this item is a new item
fashionObjectOptionalDefines several additional parameters for fashion items. Find in this table the parameters required for fashion
stock_quantityIntegerOptionalThe quanity of the item in stock
type_prefixStringOptionalA prefix to distinguish the type of item
modelStringOptionalThe model name of the item
paramsObjectOptionalAdd custom parameters. Find in this table the parameters required for params
merchantStringOptionalThe merchant you want to associate with the item
ratingIntegerOptionalA value between 1 and 5. The user rating you want to assign to the item
leftoversStringOptionalA description of the remaining stock.For example, "one" represents a product available as a single unit, "few" represents product in limited quantities (up to 10 units), and "lot" represents a product available in quantities of 10 or more units
creation_dateStringOptionalMust be in the format yyyy-mm-dd. This is the date the item was created

List of parameters for 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.

ParameterTypeRequiredDescription
locationStringYesThe location you want to specify a price for. This field is required if the locations field is provided.
priceFloat (must be positive)OptionalThe price at this location.
oldpriceFloat (must be positive)OptionalThe previous price of the item (for example, the regular price of a sale item).
stock_quantityInt (must be positive)OptionalThe quantity of the item in stock.
sizesArray of StringsOptionalA list of size options for the item.
weightInt (must be positive)OptionalThe weight of the item.
delivery_typesObjectOptionalIndicates the availability of the item. Find in this table the parameters required for delivery_types

List of parameters for delivery_types object

ParameterTypeRequiredDescription
storeInt (must be positive)YesNumber of items available in-store
deliveryInt (must be positive)YesNumber of items available for delivery
deliveryInt (must be positive)YesNumber of items available in the warehouse

List of parameters for Params object

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

ParameterTypeRequiredDescription
nameStringYesThe name of the parameter
valueArray of StringsYesArray of values for the parameter
unitStringOptionalUnit of measurement for the values.

List of parameters for Fashion object

The fashion object allows you to specify additional information about fashion items. Pass the fashion object inside the product items object.

ParameterTypeRequiredDescription
genderStringOptionalA gender to associate with the item. For example, "m", "f", or "female".
sizesArray of StringsOptionalList of sizes for the item.
typeStringYesThe 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": "one", // String (one, few, lot). Optional
"creation_date": "...", // String. Optional. Format yyyy-mm-dd,
}