Breadcrumbs

Controlling the response language output

The VMS API provides flexible language localization for returned data, allowing you to tailor the language of responses according to your needs.

To control the language used for displayed information – including error messages and other localized resources – the API supports a special hl (host language) parameter, which should be specified individually for each request.

Use one of the following ways to specify a relevant output language:

  • Use the hl HTTP Header
    Include the relevant locale in the hl header of your request.
    Example:Hl: en

  • Use the hl parameter in query string or request body
    You can also pass the hl parameter either in the query string query params or in the request body. You can pass the hl parameters directly in the URL-request.
    Example: GET https://your.domain/api/v1/items?hl=en.

Priority. If you provide the hl parameter in both the request body (or query parameters) and the HTTP header, the value specified in the HTTP header will take priority.

  • If you don't use the methods mentioned above, the localization will be set to the default language.To find out which languages are supported, you can get a list of available locales from the API response, which is often provided in a field like available_locales.