Menu
Patch Asset Family By Code
Update/create an asset family
PATCH
/api/rest/v1/asset-families/{code}Use it in a workflow
- Add a step and choose the Akeneo connector.
- Pick the Patch Asset Family By Code action (under Asset family).
- Fill in the fields below, then reference the result from later steps as
{{patchAssetFamilyByCode.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"code": "model_pictures",
"labels": {
"en_US": "Model pictures",
"fr_FR": "Photographies en pied"
},
"attribute_as_main_media": "main_image",
"naming_convention": {
"source": {
"property": "code"
},
"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": "ecommerce",
"locale": "en_US"
},
"target": {
"attribute": "thumbnail",
"channel": "ecommerce",
"locale": "en_US"
},
"operations": [
{
"type": "thumbnail",
"parameters": {
"width": 150,
"height": 150
}
},
{
"type": "colorspace",
"parameters": {
"colorspace": "grey"
}
}
]
}
],
"sharing_enabled": true,
"auto_tagging_enabled": true
}
Response
Returns 201 with a any. Read it in later steps with {{patchAssetFamilyByCode.response.data.<field>}}.
Need more? See the Akeneo guide for connection setup and behaviour shared by every action.
Was this page helpful?