Retrieve supported locales

  • Proposal service
  • Services
  • 1 route
How do I list the locales supported by the API?

This scenario explains how to retrieve the list of locales supported by the API so you can drive language and regional behavior in your application.

It is useful for locale selectors, validation rules, and synchronization between frontend and backend.

Overview

This journey relies on a single route that returns the locales currently supported by Club Med APIs. You can reuse the result to populate selectors, validate inputs, or configure localized content.

Prerequisites

  • No functional prerequisite is required.
  • Plan to cache the returned locale codes if they are reused across several journeys.
1

List supported locales

Optional

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