Returns the full translation matrix for the product: the source value and content type per translatable field, plus the translated value for every supported locale.
Required scope: read_products (for API-key authentication).
GET
/
api
/
v3
/
admin
/
products
/
{product_id}
/
translations
List product translations
const options = {
method: 'GET',
headers: {'x-spree-api-key': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('http://{defaultHost}/api/v3/admin/products/{product_id}/translations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://{defaultHost}/api/v3/admin/products/{product_id}/translations \
--header 'Authorization: Bearer <token>' \
--header 'x-spree-api-key: <api-key>'{
"data": {
"resource_id": "prod_UkLWZg9DAJ",
"resource_type": "product",
"translations": {
"de": {
"name": "Espressomaschine",
"description": null,
"slug": "espressomaschine",
"meta_description": null,
"meta_title": null,
"translated_field_count": 2
},
"fr": {
"name": null,
"description": null,
"slug": null,
"meta_description": null,
"meta_title": null,
"translated_field_count": 0
}
},
"fields": [
{
"key": "name",
"type": "string",
"source": "Espresso Machine"
},
{
"key": "description",
"type": "html",
"source": "Ullam aliquam ea tempora quae sapiente. Accusamus earum nostrum fuga nam harum. Ipsa temporibus necessitatibus atque non. Qui doloribus ex unde facere sapiente nesciunt est quam.\nCum magnam doloribus pariatur veritatis vel consequuntur ab. Id quidem quam vitae error eius dolore delectus aliquam. Eaque amet numquam at voluptatum. Voluptas occaecati nam ex autem sed qui amet tenetur."
},
{
"key": "slug",
"type": "string",
"source": "espresso-machine"
},
{
"key": "meta_description",
"type": "string",
"source": null
},
{
"key": "meta_title",
"type": "string",
"source": null
}
],
"default_locale": "en",
"supported_locales": [
"de",
"en",
"fr"
]
}
}Authorizations
Secret API key for admin access
JWT token for admin user authentication
Path Parameters
Response
200 - application/json
translations found
Was this page helpful?
⌘I
List product translations
const options = {
method: 'GET',
headers: {'x-spree-api-key': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('http://{defaultHost}/api/v3/admin/products/{product_id}/translations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://{defaultHost}/api/v3/admin/products/{product_id}/translations \
--header 'Authorization: Bearer <token>' \
--header 'x-spree-api-key: <api-key>'{
"data": {
"resource_id": "prod_UkLWZg9DAJ",
"resource_type": "product",
"translations": {
"de": {
"name": "Espressomaschine",
"description": null,
"slug": "espressomaschine",
"meta_description": null,
"meta_title": null,
"translated_field_count": 2
},
"fr": {
"name": null,
"description": null,
"slug": null,
"meta_description": null,
"meta_title": null,
"translated_field_count": 0
}
},
"fields": [
{
"key": "name",
"type": "string",
"source": "Espresso Machine"
},
{
"key": "description",
"type": "html",
"source": "Ullam aliquam ea tempora quae sapiente. Accusamus earum nostrum fuga nam harum. Ipsa temporibus necessitatibus atque non. Qui doloribus ex unde facere sapiente nesciunt est quam.\nCum magnam doloribus pariatur veritatis vel consequuntur ab. Id quidem quam vitae error eius dolore delectus aliquam. Eaque amet numquam at voluptatum. Voluptas occaecati nam ex autem sed qui amet tenetur."
},
{
"key": "slug",
"type": "string",
"source": "espresso-machine"
},
{
"key": "meta_description",
"type": "string",
"source": null
},
{
"key": "meta_title",
"type": "string",
"source": null
}
],
"default_locale": "en",
"supported_locales": [
"de",
"en",
"fr"
]
}
}
