younifyd
Menu

Patch Asset By Code

Update/create an asset

PATCH/api/rest/v1/asset-families/{asset_family_code}/assets/{code}

Use it in a workflow

  1. Add a step and choose the Akeneo connector.
  2. Pick the Patch Asset By Code action (under Asset).
  3. Fill in the fields below, then reference the result from later steps as {{patchAssetByCode.response.data}}.

Request

Path parameters

asset_family_codestringrequired

This path parameter is used to specify the unique identifier of the asset family you want to retrieve or manipulate. It is essential for identifying the specific asset family in the API requests. Ensure that the asset family code is correctly formatted and corresponds to an existing asset family in the system.

codestringrequired

This path parameter is used to specify the unique identifier of the entity you want to retrieve or manipulate. It is essential for identifying the specific entity in the API requests. Ensure that the code is correctly formatted and corresponds to an existing entity in the system.

Request body

Enter the body as JSON in the step's Body field.

codestringrequired

Code of the asset

asset_family_codestring

Code of the asset family

valuesobject

Asset attributes values. See the [Focus on the asset values](https://api.akeneo.com/concepts/asset-manager.html#focus-on-the-asset-values) section for more details.

createdstring (date-time)

Date of creation

updatedstring (date-time)

Date of the last update

json
{
  "code": "sku_54628_picture1",
  "asset_family_code": "packshot",
  "values": {
    "media_file": [
      {
        "locale": "en_US",
        "channel": "ecommerce",
        "data": "0/0/9/d/009d38fe8c97e16f6b48bbf8f6cf8a9564401cc9_allie_jean_model_picture.png",
        "linked_data": {
          "original_filename": "allie_jean_model_picture.png",
          "mime_type": "image/jpeg",
          "size": 16070,
          "extension": "jpg",
          "updated_at": "2026-04-22T07:39:37+0000"
        },
        "_links": {
          "download": {
            "href": "https://demo.akeneo.com/api/rest/v1/asset-media-files/0/0/9/d/009d38fe8c97e16f6b48bbf8f6cf8a9564401cc9_allie_jean_model_picture.png"
          },
          "share_link": {
            "href": "https://demo.asset.akeneo.com/model_pictures/media_file/allie_jean_model_picture.png"
          }
        }
      }
    ],
    "description": [
      {
        "locale": "en_US",
        "channel": "ecommerce",
        "data": "This is a product description"
      }
    ],
    "main_colors": [
      {
        "locale": "en_US",
        "channel": "ecommerce",
        "data": [
          "red",
          "blue"
        ]
      }
    ]
  },
  "created": "2021-05-31T09:23:34+00:00",
  "updated": "2021-05-31T09:23:34+00:00"
}

Response

Returns 201 with a any. Read it in later steps with {{patchAssetByCode.response.data.<field>}}.

Need more? See the Akeneo guide for connection setup and behaviour shared by every action.

Was this page helpful?