Retrieve locale schema
- Countries
- Services
- 2 routes
How to retrieve the validation schema for a resource in a given locale or country?
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.
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
resourcevalue. With the sources available for this scenario, supported values areprofileandbilling. - A
localeOrCountrycompatible with the route, such as a country code or a locale returned byGET/v0/locales. - If your integration depends on a proposal context,
proposal_idcan be passed when relevant.
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.
Process workflow
Legend:
Mandatory
Optional