Locales API Routes
A locale is a language that content is translated into for customers to view in a storefront. Medusa installs locales by default. These API routes allow admin users to retrieve and view locales.
GET /admin/locales#
List Locales
Retrieve a list of locales. The locales can be filtered by fields such as code. The locales can also be sorted or paginated.
translation feature flag is enabled. Set the MEDUSA_FF_TRANSLATION environment variable to true to enable it.Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
qstringOptionalcodestring | string[]OptionallimitnumberOptionaloffsetnumberOptionalorderstringOptional-.with_deletedbooleanOptionalfieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. Without prefix it will replace the entire default fields.$andobject[]Optional$orobject[]OptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberestimate_countnumberOptionallocalesobject[]The list of locales.
localesobject[]400, 401, 404, 409, 422, 500: an error response is returned.
GET /admin/locales/{code}#
Get a Locale
Retrieve a locale by its code. You can expand the locale's relations or select the fields that should be returned.
translation feature flag is enabled. Set the MEDUSA_FF_TRANSLATION environment variable to true to enable it.Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
codestringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. Without prefix it will replace the entire default fields.Request examples
Responses
200 OK
localeobjectThe locale's details.
localeobject400, 401, 404, 409, 422, 500: an error response is returned.