v1
latestSwagger 2.02026-07-13137761.0 MBAsset family
Update/create an asset family
This endpoint allows you to update a given asset family. Note that if the asset family does not already exist, it creates it.
patch/api/rest/v1/asset-families/{code}
Path parameters
codestring required
Code of the resource
Request body
Example request
{
"code": "model_pictures",
"labels": {
"en_US": "Model pictures",
"fr_FR": "Photographies en pied"
},
"attribute_as_main_media": "main_image",
"naming_convention": {
"source": {
"property": "code",
"channel": null,
"locale": null
},
"pattern": "/(?P<product_ref>.*)-.*/",
"abort_asset_creation_on_error": true
},
"product_link_rules": [
{
"product_selections": [
{
"field": "sku",
"operator": "EQUALS",
"value": "{{product_ref}}"
}
],
"assign_assets_to": [
{
"attribute": "model_pictures",
"mode": "replace"
}
]
}
],
"transformations": [
{
"label": "Thumbnail plus black and white transformation",
"filename_suffix": "_thumbnailBW",
"source": {
"attribute": "main_image",
"channel": null,
"locale": null
},
"target": {
"attribute": "thumbnail",
"channel": null,
"locale": null
},
"operations": [
{
"type": "thumbnail",
"parameters": {
"width": 150,
"height": 150
}
},
{
"type": "colorspace",
"parameters": {
"colorspace": "grey"
}
}
]
}
],
"sharing_enabled": true
}Response
Created