Every API key (prefix
ch_org_) is bound to exactly one organization. Endpoints under /v1/organizations therefore operate on your organization. The Admin API (/admin/v1, keys prefixed ch_admin_) can manage organizations across accounts.The organization object
Unique identifier, prefixed
org_.Always
organization.Human-readable name of the organization.
All location IDs (
loc_…) belonging to this organization.Subset of
location_ids that are currently active.ISO 8601 UTC timestamp of creation.
ISO 8601 UTC timestamp of the last update.
The expanded location objects. Returned only when you request
expand[]=locations.The organization object
Expanding locations
Passexpand[]=locations on retrieve endpoints to inline full location objects under the locations field instead of receiving only location_ids.
List organizations
ch_org_…). Admin keys are rejected with 403.
Query parameters
Page size, between
1 and 100.Cursor: return results after this object ID. Mutually exclusive with
ending_before.Cursor: return results before this object ID. Mutually exclusive with
starting_after.Only return organizations created at or after this ISO 8601 timestamp.
Only return organizations created at or before this ISO 8601 timestamp.
Only return organizations updated at or after this ISO 8601 timestamp.
Only return organizations updated at or before this ISO 8601 timestamp.
Expand related fields on each item, e.g.
expand[]=locations.Request
Response
200 OK
Error example
401 Unauthorized
Retrieve an organization
not_found_error (404) is returned.
Path parameters
The organization ID, e.g.
org_8f2k1d9a.Query parameters
Expand related fields, e.g.
expand[]=locations.Request
Response
200 OK
Error example
404 Not Found
Update an organization
{organization_id} (which your API key must have access to). Only the fields you supply are changed.
Auth: organization API key.
Body parameters
New name for the organization.
location_ids, active_location_ids, and all timestamps are managed by Chataigne and cannot be set directly. To add a location, use Create a location.Request
Response
200 OK
Error example
400 Bad Request
List an organization’s locations
Path parameters
The organization ID, e.g.
org_8f2k1d9a.Query parameters
Page size, between
1 and 100.Cursor: return results after this location ID. Mutually exclusive with
ending_before.Cursor: return results before this location ID. Mutually exclusive with
starting_after.Only locations created at or after this ISO 8601 timestamp.
Only locations created at or before this ISO 8601 timestamp.
Only locations updated at or after this ISO 8601 timestamp.
Only locations updated at or before this ISO 8601 timestamp.
Request
Response
200 OK
Paginate by passing the last item’s
id as starting_after until has_more is false.Error example
403 Forbidden
Create a location
Path parameters
The organization ID, e.g.
org_8f2k1d9a.Headers
A unique key for safely retrying the request, e.g. a UUID you generate.
Body parameters
Display name of the location.
ISO currency code. One of
CHF, EUR, GBP, BRL, USD, MXN.ISO country code. One of
FR, CH, GB, BR, LU, MX, US.IANA timezone identifier, e.g.
Europe/Zurich.Default language code for the location, e.g.
fr. Optional — when omitted it is inferred from
the country. Countries without a single default language (e.g. CH) require it, and a missing
value returns a 400 invalid_request_error.Postal address. Set to
null or omit if unknown.Request
Response
201 Created
Error example
409 Conflict
Errors
All errors return an HTTP status with a body shaped as:| Type | HTTP | When it happens |
|---|---|---|
invalid_request_error | 400 | Malformed request or invalid parameter. |
authentication_error | 401 | Missing API key. |
authorization_error | 403 | Wrong key type for the surface (admin key on /v1, org key on /admin/v1). |
not_found_error | 404 | Organization or location not found / not accessible to the key. |
conflict_error | 409 | Concurrent in-flight duplicate of an idempotent request. |
idempotency_error | 409 | Same Idempotency-Key reused with a different body. |
rate_limit_error | 429 | Per-key, per-surface rate limit exceeded. Honor Retry-After. |
api_error | 500 | Unexpected server error. |
Every response carries an
X-Request-Id header, mirrored in error bodies as error.request_id. You may echo your own with the x-request-id header. Include it when contacting support. Rate-limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are present on every response.Related resources
Locations
Retrieve and update locations, settings, opening hours, and special closings.