Get the locale tree
const url = 'https://api.ebitex.io/content/delivery/v1/locales';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ebitex.io/content/delivery/v1/locales \ --header 'Authorization: Bearer <token>'The organization’s locales as a flat, parent-linked list, where parentCode is null for the root.
Use it to choose the one locale= code to send on other requests. The API takes exactly one code and does not fall back from fr-CA to fr on its own. Cacheable at the edge on the same terms as /sites.
Send site (a root node id from /sites) to get the languages that one site serves. A site can arrange its own languages under the organization’s default, so two sites can differ; a site that has not been customized answers the organization’s list. It is cached at the edge on the same terms as the organization-wide list, and a change to a site’s languages purges it.
Key: a delivery key (content.delivery.read).
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Responses
Section titled “ Responses ”OK
environment_mismatch: env names a different delivery environment than the key’s.
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.
key_realm_mismatch: the key is limited to one realm and the site named by site belongs to a realm outside it. A key with no realm serves every site; one with a realm serves the sites that realm and the realms below it own.
scope_denied: the key lacks this route’s scope. origin_denied or ip_denied: a browser-safe key was used from an origin or address outside its restrictions. app_not_available: Content is not enabled for the organization.
Quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.