Skip to main content
This guide takes you from receiving an API key to retrieving a location your integration can access.

1. Store your API key

Your Chataigne contact provides a key beginning with ch_org_. Store it in a secret manager or an environment variable on your server.
Never expose a Chataigne API key in browser or mobile code, logs, screenshots, or source control. If a key is exposed, ask your Chataigne contact to rotate it.

2. List your locations

Send the key in the x-api-key header. GET /v1/locations returns every location in the key’s scope that it has permission to read.

3. Read the list response

List endpoints return a list object. The data array contains the resources available on the current page.
If the key is scoped to a business organization, data can contain several locations. If it is scoped to one location, data contains that location. See Organizations and locations for the full access model.

4. Retrieve one location

Copy a location id from the list and place it in the URL:
The response is the complete location resource. Keep the returned ID: you will use it in location settings and analytics endpoints.

Troubleshooting

Every response includes an X-Request-Id header. Log it and include it when contacting Chataigne support.

Next steps

Find all your resources

Discover your organization and understand all location-listing options.

Manage a location

Update profile information and operational settings.