---
uuid: 038d9982-f569-4e41-8d96-9f9fbc1f7df7
date_created: 2026-02-27T06:19:33.854Z
date_updated: 2026-04-03T07:35:04.487Z
seo_url: retrieve-locale-schema
category: Services
tags: 
  - Countries
routes: 
  - GET /v0/locales
  - GET /v3/schemas/{resource}/{localeOrCountry}
---

# Retrieve locale schema

This scenario explains how to retrieve the validation schema associated with a Club Med API resource for a given locale or country. It helps an API consumer discover which locale values are available, then request the JSON schema used to validate a resource such as `profile` or `billing`.

## Flow

```mermaid
flowchart LR
    step0["List available locales"]
    step1["Retrieve the resource schema"]
    step0 --> step1
```

## Overview

Use this scenario when an application must validate payloads against the schema expected by a Club Med API resource. The flow starts by listing the locales available for the current API key, then retrieves the schema for the target resource and locale.

## Prerequisites

* A valid `x-api-key`.
* The target `resource` value. With the sources available for this scenario, supported values are `profile` and `billing`.
* A `localeOrCountry` compatible with the route, such as a country code or a locale returned by `GET /v0/locales`.
* If your integration depends on a proposal context, `proposal_id` can be passed when relevant.

::::note
:::
NOTE
:::

The schema response follows a JSON Schema format and can be used to validate client-side or server-side payloads before submitting them to another API route.
::::

## 1 - List available locales

Use `GET /v0/locales` to list the locales available for the current API key before calling a route that depends on a locale or country.

#### Prerequisites

* A valid `x-api-key`.

#### Calling CURL

```bash
curl -X 'GET' \
  'https://api.clubmed.com/v0/locales' \
  -H 'accept: application/json' \
  -H 'x-api-key: YOUR_API_KEY'
```

#### Example answer

```json
[
  "fr-FR",
  "fr-BE",
  "nl-BE",
  "de-CH",
  "fr-CH",
  ...
]
```

> **Info:** reuse one of the returned locale values to build the next request to `GET /v3/schemas/{resource}/{localeOrCountry}` when your integration depends on locale-specific validation.

***

**Response codes**

* **OK Response (200):** returns the list of locales supported for the current API key.
* **Error (400):** `bad_request` or `validation_error`.
* **Error (401):** not documented in Swagger.
* **Error (403):** `forbidden` when the API key is not allowed to access the route.
* **Error (404):** not documented in Swagger.

**Related route**: [GET https://api.clubmed.com//v0/locales](https://api.clubmed.com/doc?search=GET%20%2Fv0%2Flocales)

## 2 - Retrieve the resource schema

Use `GET /v3/schemas/{resource}/{localeOrCountry}` to retrieve the JSON Schema associated with a resource and a target locale or country.

#### Prerequisites

* A valid `x-api-key`.
* A supported `resource` value. With the available sources, documented values are `profile` and `billing`.
* A `localeOrCountry` value compatible with the route, such as `fr-FR` or `FR`.
* If the request depends on a proposal context, an optional `proposal_id`.

#### Calling CURL

```bash
curl -X 'GET' \
  'https://api.clubmed.com/v3/schemas/profile/fr-FR?proposal_id=123456' \
  -H 'accept: application/json' \
  -H 'x-api-key: YOUR_API_KEY'
```

#### Example answer

```json
{
  "title": "ProfileSchema_fr-FR",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://api-test/v1/schemas/resource/fr-FR",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "string"
  ],
  "definitions": "string",
  "properties": "string"
}
```

> **Info:** reuse the returned `required` and `properties` keys to drive client-side or server-side validation before submitting payloads to another route.

***

**Response codes**

* **OK Response (200):** returns the JSON Schema for the requested resource and locale or country.
* **Error (400):** invalid or missing input, including `bad_request` or `validation_error`.
* **Error (401):** not documented in Swagger.
* **Error (404):** `not_found` when no schema matches the requested combination.

**Related route**: [GET https://api.clubmed.com//v3/schemas/{resource}/{localeOrCountry}](https://api.clubmed.com/doc?search=GET%20%2Fv3%2Fschemas%2F%7Bresource%7D%2F%7BlocaleOrCountry%7D)
