Reference

Edit materials

GET /v1/edit-materials returns, page by page and in catalog order, the materials and textures available for mask editing. The list can be filtered by category (wood, stone, paint…) or by name. Pass the id of a material in the material field of a modify layer of an edit.
curl "https://api.renderthink.com/v1/edit-materials?category=wood&lang=en&limit=20" \
-H "Authorization: Bearer $RENDERTHINK_API_KEY"
URL parameters:
NameTypeDescription
categorystringid of a category (see “Categories” below): only the materials of this category and its subcategories are returned.
searchstringText searched in the material names, in any language, ignoring accents. 100 characters at most.
limitintegerNumber of objects per page, from 1 to 100. Default: 20.
afterstringid of the last object of the previous page (see Pagination).
langstringLanguage of names: en or fr. Default: en.
category and search can be combined. Key permission: edits.
A list of edit_material objects:
json
{
"object": "list",
"data": [
{
"object": "edit_material",
"id": "mat_4Zq8nV2bXk7pLr9TcW3yHd",
"name": "Light oak",
"image_url": "https://cdn.renderthink.com/...",
"thumbnail_url": "https://cdn.renderthink.com/...",
"category": "wood"
}
],
"has_more": true
}
FieldTypeDescription
objectstringAlways edit_material.
idstringMaterial identifier (mat_…), passed in the material field of a layer.
namestringName in the requested language, or in the catalog's original language if untranslated.
image_urlstringPublic URL of the material image.
thumbnail_urlstring or nullPublic URL of a thumbnail, to show in a list of choices; null if the material has none.
categorystring or nullid of its category (see “Categories”), or null if it has none.
GET /v1/edit-material-categories returns the main material categories (wood, stone, paint…) that hold at least one material, subcategories included, in catalog order and in a single page. Their id is stable: it is the value of the category filter.
curl "https://api.renderthink.com/v1/edit-material-categories?lang=en" \
-H "Authorization: Bearer $RENDERTHINK_API_KEY"
URL parameter: lang, the language of names, en (default) or fr. Key permission: edits.
json
{
"object": "list",
"data": [
{ "object": "edit_material_category", "id": "wood", "name": "Wood" },
{ "object": "edit_material_category", "id": "stone", "name": "Stone" }
],
"has_more": false
}
FieldTypeDescription
objectstringAlways edit_material_category.
idstringStable identifier (wood, stone…).
namestringName in the requested language.
StatusCodeCause
400parameter_invalidlimit outside 1 to 100, after malformed or unknown, category that is not a category id, search longer than 100 characters, or lang other than en or fr.
Errors shared by every route (key, permissions, limits) are in Errors.