Default locale
The Default locale is the one locale that is the default for your catalog at any time. It is the language your translatable content (product names, option labels, and so on) is authored in, and the one it falls back to when a translation is missing for the locale a caller requests.
Unlike most resources, this is a singleton: there is no id, no list, and no create or delete. You read the current default and change which locale is the default through a single fixed path.
- Retrieve the current default with
GET /api/default_locale. - Set a new default with
PUT /api/default_locale- a full replace, not a partial update.
The DefaultLocale object
Section titled “The DefaultLocale object”| Property | Type | Required | Description |
|---|---|---|---|
code | string | null | - | The code of the current default locale. |
The code is a locale code such as fr-FR or en-US. Exactly one locale is the default at any time, so setting a new one supersedes the previous default.
Conventions
Section titled “Conventions”Authentication and headers
Section titled “Authentication and headers”All requests require an OAuth 2.0 bearer token:
Authorization: Bearer <token>Replacing the default
Section titled “Replacing the default”PUT replaces the whole resource with Content-Type: application/ld+json (or application/json): send the target locale code in the body.