Skip to main content

Overview

The Data API is a REST API that allows to retrieve or write data stored on our remote servers. You can use the available endpoints to:

  • retrieve visit events for a given visitor.
  • send additional visit events for a given visitor, such as offline conversion events.
  • send and retrieve product data for a given sitecode.
  • store additional data for a given visitor, such as CRM or segmentation data.

Data API endpoints

We provide endpoints for 3 main categories of data:

Visit endpoints

The Visit endpoints allow to retrieve and send events (conversion, custom data, segments...) for a given visitor code. They can be used to import offline purchase data (such as physical store purchases) to Kameleoon.

  • GET /visit/visitor: this endpoint can be used to retrieve visits data collected by Kameleoon such as experiments and personalizations being triggered for the user or targeted segments.
note

This endpoint is only available if you have access to Kameleoon Feature Experimentation solution. For further details, please reach out to your Customer Success Manager.

  • POST /visit/forget: this endpoint can be used to remove data for several visitors.
  • POST /visit/events: this endpoint can be used to post data for a given visitor, such as conversion events, page view events etc.

Product endpoints

The Product endpoints allow to retrieve and send product data for a given sitecode. They can be used to register product events such as view, add to cart or purchase events, or to obtain statistics about a given product (eg. how many times it was bought or viewed in the last hour or day).

  • POST /product/events: this endpoint can be used to post attributes (name, price etc.) and events (view, add to cart, purchase) for several products, which can then be retrieved and used for targeting or product recommendations purposes, by using the obtainProductData and obtainProductInteractions methods available in our Activation API. You can also use the productCounters and productData endpoints.
  • GET /product/productCounters: this endpoint can be used to retrieve counts (number of views, add to cart quantities, transaction quantities) for several products.
  • GET /product/productData: this endpoint can be used to retrieve attributes for several products.
note

You need to have access to the Product Recommendation module or to the Product Targeting add-on. Both can be added to our Web Experimentation solution. For more information, please get in touch with your Customer Success Manager.

Map endpoints

The Map endpoints allow to store additional data for a given key (usually a visitor code or an internal User ID), which can then be retrieved and used for targeting and segmentation purposes, by using the retrieveDataFromRemoteSource method available in our Activation API and all our SDKs. You can also use the map endpoint to retrieve stored data for a given key.

  • GET /map/map: this endpoint can be used to retrieve data for a given key.
  • GET /map/maps: this endpoint can be used to retrieve data for several keys.
  • POST /map/maps: this endpoint can be used to post data for several keys.

Authentication and Rate Limiting

Authentication

The Data API uses the same authentication flow as the Automation API utilizing JSON web tokens.

To maintain security and protect your API credentials, authentication is recommended only for certain types of requests:

  • Server-side sources: For requests originating from your servers, authentication is highly recommended and increases your rate limits. This is recommended if you only use our server-side SDKs with Feature Experimentation.
  • Client-side sources: For requests originating from a client application, such as a web browser, where your API credentials could be exposed, do not authenticate. This is not recommended if you use Kameleoon Web Experimentation.

Any request that provides an API token with an incorrect format, an expired token, or an invalid signature will result in an HTTP 401 "Unauthorized" response.

To learn more about the authentication process, refer to the Automation API Authentication Flow documentation.

note

By default, authentication is not required as the Data API can be used from our web experimentation engine to retrieve historical data. If you are exclusively using Feature Experimentation and server-side SDKs, please contact your Customer Success Manager to enable authentication for the endpoints of your choice. We offer a flexible setup that allows you to secure specific endpoints and restrict authentication to only GET or POST requests.

Rate Limits

The Data API applies rate limiting based on the IP address of the requester. If your app exceeds these limits, the API will return an HTTP 429 "Too Many Requests" response.

You can increase your limits for server-side sources by authenticating.

Request typeUnauthenticated limitAuthenticated limit
GET Requests5 per second50 per second
Each other HTTP method50 per second (per method)1000 per second (per method)