Authentication

Our API methods are categorized into two types based on authentication requirements: public endpoints that do not require authentication, and private endpoints that do.

Public endpoints, such as those used for Search, Browse, Recommendations, Autocomplete or the AI Shopping Assistant, are intended to serve users of our customers and do not require authentication.

In contrast, private endpoints, which are used to manage catalog data or to configure various aspects of Constructor (like facets, sort options, redirects, etc.), require an authentication token.

Authentication parameters

Authentication is handled via HTTP Basic Auth. To authenticate, provide your API token as the username in the Basic Auth header of every request - no password should be specified.

You can obtain an API token from the customer dashboard under the Integration > API Integration section. Note that all API requests must be made over HTTPS.

curl -sS -X GET
  -H "Content-Type: application/json"
  -u "[API token]:"
  "https://ac.cnstrc.com/v2/items?key=[API key]"

If authentication fails, the API will respond with a 401 Unauthorized status code.

Difference between API key and API token

An API key is a public identifier used to specify an index in API calls, while the API token is used for authentication and authorization.

The API token used for authorization is sensitive information, and therefore must be kept confidential.