Import categories
This endpoint imports all of your product categories into your Kameleoon account.
HTTP Request
POST https://api.products.kameleoon.com/import/categories
Before uploading products, it is necessary to upload an up-to-date list of categories into our database. The data is sent as a JSON string that includes the body of the request. You must send all categories in a single request.
List of query parameters
Parameter | Type | Required | Description |
---|---|---|---|
shop_id | String | Yes | 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 | String | Yes | 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. |
categories | List | Yes | A list of category objects. Find in this table the parameters required for categories |
webhook | String | No | The Webhook URL is where a POST request will be sent upon completion of the import. |
The webhook
serves to notify the developer once a request has been completed. When all specified categories in the API call have been imported and are fully available, a POST request will be sent to the designated webhook.
We highly recommend using the webhook
if you are importing a large number of categories, as processing them in Kameleoon may take several minutes.
If you are importing products using our import product endpoint, using the webhook ensures that all categories have been fully processed before initiating the product import. Since categories must be processed by Kameleoon first, any products without a known category will be ignored during the import process.
Example of a successful request:
{
"status": "success"
}
Example of an unsuccessful request:
{
"status": "error",
"message": "MESSAGE"
}
List of parameters for categories
object
Parameter | Type | Required | Description |
---|---|---|---|
id | String | Yes | A unique ID assigned to the category |
name | String | Yes | Name of the category |
parent | String/NULL | Optional | If the category is hierarchal, this field defines a parent for this category |
url | String | Optional | A URL to associate with the category |
alias | String | Optional | An alias for the category |
Example JSON request
{
"shop_id": "eehj3eu84299kg5ghw5a6743r8",
"shop_secret": "pmd5362597thrgq8k256ep01t0",
"categories": [ {
"id": "footwearID",
"name": "footwear",
"url": "https://example.com/footwear",
"alias": "kicks"
},
{
"id": "shoesID",
"name": "shoes",
"parent": "footwearID",
},
{
"id": "bootsID",
"name": "boots",
"parent": "footwearID",
}, ]
}