Skip to content

Add a language ​

Last updated View as Markdown

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 NameParam TypeDescriptionRequired
localestringA locale from the list of locales, for example frYes

Response ​

[201] Created

json
{
  "locale": "fr",
  "name": "French",
  "primary": false,
  "published": false
}