Languages
Moltin provides a multilingual service for the Product API. Using the Settings API you can add additional supported languages, and when you update a product, you can specify the X-Moltin-Language
header.
To be able to create translations, you'll need to first add the desired language(s) to your store settings. You can read more about how you can achieve this here.
You can create translations for both product name
and description
fields.
Create a Translation
PUT
https://api.moltin.com/v2/products/:id
Path Parameters
Name | Type | Description |
---|---|---|
id | string | The ID of the product you wish to update |
Headers
Name | Type | Description |
---|---|---|
X-Moltin-Language | string | The language code defined in project settings |
Authorization | string | The Bearer token to grant access to the API |
Request Body
Name | Type | Description |
---|---|---|
description | string | The translated |
name | string | The translated |
id | string | The Product ID |
type | string | Always |
If the requested language does not have a translation available, the default language will be returned.
Get all Products by Preferred Language
GET
https://api.moltin.com/v2/products
Headers
Name | Type | Description |
---|---|---|
X-Moltin-Language | string | The language code as defined in project settings |
Authorization | string | The Bearer token to grant access to the API |
Get a translated Product by ID
GET
https://api.moltin.com/v2/products/:id
Path Parameters
Name | Type | Description |
---|---|---|
id | string | The ID of the product |
Headers
Name | Type | Description |
---|---|---|
X-Moltin-Language | string | The language code as defined in project settings |
Authorization | string | The Bearer token to grant access to the API |
Last updated