Returns every translatable resource type and its translatable fields (key + content type), so clients can render translation editors generically.
Required scope: read_settings (for API-key authentication).
GET
/
api
/
v3
/
admin
/
translatable_resources
List translatable resources
const options = {
method: 'GET',
headers: {'x-spree-api-key': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('http://{defaultHost}/api/v3/admin/translatable_resources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://{defaultHost}/api/v3/admin/translatable_resources \
--header 'Authorization: Bearer <token>' \
--header 'x-spree-api-key: <api-key>'{
"data": [
{
"resource_type": "option_type",
"fields": [
{
"key": "label",
"type": "string"
}
],
"readable": true
},
{
"resource_type": "option_value",
"fields": [
{
"key": "label",
"type": "string"
}
],
"readable": false
},
{
"resource_type": "product",
"fields": [
{
"key": "name",
"type": "string"
},
{
"key": "description",
"type": "html"
},
{
"key": "slug",
"type": "string"
},
{
"key": "meta_description",
"type": "string"
},
{
"key": "meta_title",
"type": "string"
}
],
"readable": true
},
{
"resource_type": "category",
"fields": [
{
"key": "name",
"type": "string"
},
{
"key": "pretty_name",
"type": "string"
},
{
"key": "description",
"type": "html"
},
{
"key": "permalink",
"type": "string"
}
],
"readable": true
},
{
"resource_type": "taxonomy",
"fields": [
{
"key": "name",
"type": "string"
}
],
"readable": false
},
{
"resource_type": "store",
"fields": [
{
"key": "name",
"type": "string"
},
{
"key": "meta_description",
"type": "string"
},
{
"key": "meta_keywords",
"type": "string"
},
{
"key": "seo_title",
"type": "string"
},
{
"key": "customer_support_email",
"type": "string"
},
{
"key": "address",
"type": "string"
},
{
"key": "contact_phone",
"type": "string"
}
],
"readable": false
},
{
"resource_type": "policy",
"fields": [
{
"key": "name",
"type": "string"
},
{
"key": "body",
"type": "html"
}
],
"readable": false
}
]
}Was this page helpful?
⌘I
List translatable resources
const options = {
method: 'GET',
headers: {'x-spree-api-key': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('http://{defaultHost}/api/v3/admin/translatable_resources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://{defaultHost}/api/v3/admin/translatable_resources \
--header 'Authorization: Bearer <token>' \
--header 'x-spree-api-key: <api-key>'{
"data": [
{
"resource_type": "option_type",
"fields": [
{
"key": "label",
"type": "string"
}
],
"readable": true
},
{
"resource_type": "option_value",
"fields": [
{
"key": "label",
"type": "string"
}
],
"readable": false
},
{
"resource_type": "product",
"fields": [
{
"key": "name",
"type": "string"
},
{
"key": "description",
"type": "html"
},
{
"key": "slug",
"type": "string"
},
{
"key": "meta_description",
"type": "string"
},
{
"key": "meta_title",
"type": "string"
}
],
"readable": true
},
{
"resource_type": "category",
"fields": [
{
"key": "name",
"type": "string"
},
{
"key": "pretty_name",
"type": "string"
},
{
"key": "description",
"type": "html"
},
{
"key": "permalink",
"type": "string"
}
],
"readable": true
},
{
"resource_type": "taxonomy",
"fields": [
{
"key": "name",
"type": "string"
}
],
"readable": false
},
{
"resource_type": "store",
"fields": [
{
"key": "name",
"type": "string"
},
{
"key": "meta_description",
"type": "string"
},
{
"key": "meta_keywords",
"type": "string"
},
{
"key": "seo_title",
"type": "string"
},
{
"key": "customer_support_email",
"type": "string"
},
{
"key": "address",
"type": "string"
},
{
"key": "contact_phone",
"type": "string"
}
],
"readable": false
},
{
"resource_type": "policy",
"fields": [
{
"key": "name",
"type": "string"
},
{
"key": "body",
"type": "html"
}
],
"readable": false
}
]
}
