curl --request POST \
--url https://eu-data.kameleoon.io/product/events \
--header 'Content-Type: */*' \
--data '"<string>"'Posts attributes and events for multiple products.
An incoming request is rejected if the source is identified as bot or spider, according to user-agent filtering rules from IAB/ABC. Kameleoon uses a single-pass method. This means no specific action is required when sending requests from a web browser using a standard library (XHR); however, in other cases, you should set a custom value for the User-Agent request header to overwrite the default value set by the library.
curl --request POST \
--url https://eu-data.kameleoon.io/product/events \
--header 'Content-Type: */*' \
--data '"<string>"'Documentation Index
Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
Use this file to discover all available pages before exploring further.
Id of the Kameleoon project
Product Id / EAN. Note: if EAN is provided here, then it is assumed as the common value for all events in the body (bulk posting of several events restricted to the same product EAN). On the contrary, if you would like to bulk post several events across several different products EAN, then you must provide the EAN with every event in the body
Set to true if you provide the body content in JSON format, else URL query format is assumed. See body schema
Save events. The body size limit is 3 MB.
If the json query parameter is missing or set to false, the body consists of one or more lines. Each line represents an event in the following format: <parameter 1 name>=<parameter 1 value>&<parameter 2 name>=<parameter 2 value> and so on. Escape values that may contain characters = or &, for example, using the encodeURIComponent JavaScript function.
If the json query parameter is set to true, provide the body as a JSON array of events. Represent each event as a JSON object, formatted like this: { "<parameter 1 name>": <parameter 1 value>, "<parameter 2 name>": <parameter 2 value>, etc. }.
In all cases, the body contains the following parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| ean | string | Required | Product code Limit to 100 characters |
| nonce | string | Required | A random string of 16 hexadecimal characters, unique to each event. |
| eventType | string | Required | One of the following: PRODUCTPAGE, PRODUCTADDTOCART, PRODUCTBUY |
PRODUCTPAGE:| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | Product name Limit to 250 characters |
| categories | JSON array | Optional | A JSON array of product categories. Limit to 100 categories. |
| url | string | Optional | Product URL Limit to 2048 characters |
| imageURL | string | Optional | URL of product picture Limit to 2048 characters |
| available | boolean | Optional | Is the product available? |
| availableQuantity | int32 | Optional | Product quantity available |
| brand | string | Optional | Product brand Limit to 250 characters |
| isChild | boolean | Optional | Is the product for children? |
| isFashion | boolean | Optional | Does the product follow fashion trends? |
| fashion | JSON object | Optional | Fashion details. |
| sku | string | Optional | Product SKU Limit to 100 characters |
| merchantID | string | Optional | Product merchant ID Limit to 100 characters |
| price | float64 | Optional | Product price |
| oldPrice | float64 | Optional | Product old price |
| tags | JSON array | Optional | A JSON array of product tags. |
| rating | float64 | Optional | Product rating |
| description | string | Optional | Product description Limit to 4000 characters |
| params | JSON array | Optional | A JSON array of product params. |
| groupId | string | Optional | Product group ID Limit to 100 characters |
| accessories | JSON array | Optional | A JSON array of product accessories. |
| seasonality | JSON array | Optional | A JSON array of months (1-12). |
| priceMargin | int32 | Optional | Product price margin |
| isNew | boolean | Optional | Is the product new? |
| auto | JSON object | Optional | Auto details. |
| model | string | Optional | Product model Limit to 100 characters |
| leftovers | string | Optional | Product leftovers Limit to 100 characters |
| typePrefix | string | Optional | Product type prefix Limit to 100 characters |
PRODUCTADDTOCART:| Name | Type | Required | Description |
|---|---|---|---|
| quantity | int32 | Required | Quantity of product added to cart |
PRODUCTBUY:| Name | Type | Required | Description |
|---|---|---|---|
| quantity | int32 | Required | Quantity of product bought |
ean parameter in the URL query part.json is missing or its value is false:eventType=PRODUCTPAGE&name=Marvelous%20product&available=true&availableQuantity=50&sizes=%5B%22S%22%2C%20%22M%22%2C%20%22L%22%5D
eventType=PRODUCTADDTOCART&quantity=2json is true (pretty representation):[
{
"eventType": "PRODUCTPAGE",
"name": "Marvelous product",
"available": true,
"availableQuantity": 50,
"isFashion": true,
"fashion": {
"sizes": [
"S",
"M",
"L"
]
}
},
{
"eventType": "PRODUCTADDTOCART",
"quantity": 2
}
]json is true (compact representation):[{"eventType":"PRODUCTPAGE","name":"Marvelous product","available":true,"availableQuantity":50,"isFashion":true,"fashion":{"sizes":["S","M","L"]}},{"eventType":"PRODUCTADDTOCART","quantity":2}]The body is of type string<UTF-8>.
Kameleoon processed the URL query and accepted the request. The response returns no content.
Kameleoon processes the body asynchronously and has not checked the body syntax yet.
Was this page helpful?