Add a language
Endpoint: https://api.youcan.shop/languages
Method: POST
Required Scopes
edit-languages
Notes
- The language is added unpublished. Visitors do not see it until you publish it.
- When you add a language that is already on the store, nothing changes.
- You get a 422 for a locale that is not in the list of locales.
Parameters
| Param Name | Param Type | Description | Required |
|---|---|---|---|
| locale | string | A locale from the list of locales, for example fr | Yes |
Response
[201] Created
json
{
"locale": "fr",
"name": "French",
"primary": false,
"published": false
}