Suppliers have the ability to store their content in multiple languages. We use the
Accept-Language header in the request which ideally should be equal to what the client's browser/user agent sent.
More information about the structure of that header is here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language
We will then attempt to best match with a list of the languages that the supplier have already translated their content into. The response will include
Content-Langauge header indicating the language of the content we returned. This follows the HTTP standard.
For example a request that specifies a range of preferred languages:
GET /octo/products/94cdd032-3d32-416d-b0a4-abf8b7495b8b HTTP/1.1Host: api.ventrata.comAuthorization: Bearer 5bd1629a-323e-4edb-ac9b-327ef51e6136Accept-Language: fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5
And the response matching to english, as that's the only language available for that product:
HTTP/1.1 200 OKContent-Language: en
Some implementations might plan to cache this content locally, for that we also return a
X-Available-Languages header which will include a list of languages the supplier has translated the content into.
HTTP/1.1 200 OKX-Available-Languages: en, fr, it, de
You can then repeat the request with each of the languages to get the different content.