Get available locales

  • Locales
  • Services
  • 1 route
How to retrieve the list of configured locales?

As an API consumer, I want to know what are my available locales in order to cover my commercial scope and translate my contents.

This scenario demonstrates how API consumers can retrieve the list of authorized locale configurations, essential for adapting commercial scope and content translation.

1

List available locales

Mandatory

This route returns the list of locale values available for the current API key.

Prerequisites

Have a valid API key. Then reuse one of these locales in calls that expect accept-language or a locale segment.

Calling CURL

curl -X GET \
  -H "x-api-key: $API_KEY" \
  "https://api.clubmed.com/v0/locales"

Example answer

[
  "fr-FR",
  "en-US",
  "es-ES"
]

info: This list depends on the current API key configuration. It helps you build subsequent requests with a supported locale.


Response codes

  • 200 OK: the supported locale list is returned.
  • 400 Bad Request: the request is invalid.
  • 403 Forbidden: the API key is not allowed to call this route.
GET/v0/locales
See more