v1

latestSwagger 2.02026-07-13137761.0 MB
PAM asset

Update/create several PAM assets

This endpoint allows you to update several PAM assets at once.

patch/api/rest/v1/assets

Request body

codestring required

PAM asset code

categoriesstring[]

Codes of the PAM asset categories in which the asset is classified

descriptionstring

Description of the PAM asset

localizableboolean

Whether the asset is localized or not, meaning if you want to have different reference files for each of your locale

tagsstring[]

Tags of the PAM asset

end_of_usestring dateTime

Date on which the PAM asset expire

Example request

{
  "code": "tshirt_artemis_main_picture",
  "categories": [
    "tshirts_assets"
  ],
  "description": "The main picture of the Artemis t-shirt",
  "localizable": false,
  "tags": [
    "tshirts",
    "red",
    "summer"
  ],
  "end_of_use": "2019-09-01T00:00:00+0200",
  "variation_files": [
    {
      "_link": {
        "download": {
          "href": "https://demo.akeneo.com/api/rest/v1/assets/tshirt_artemis_main_picture/variation-files/ecommerce/no_locale/download"
        },
        "self": {
          "href": "https://demo.akeneo.com/api/rest/v1/assets/tshirt_artemis_main_picture/variation-files/ecommerce/no_locale"
        }
      },
      "locale": null,
      "scope": "e_commerce",
      "code": "7/5/8/e/758e39d48va7b42a55001434fd3d7b6cf3189b7f_tshirt_artemis_main_picture_ecommerce.jpg"
    },
    {
      "_link": {
        "download": {
          "href": "https://demo.akeneo.com/api/rest/v1/assets/tshirt_artemis_main_picture/variation-files/print/no_locale/download"
        },
        "self": {
          "href": "https://demo.akeneo.com/api/rest/v1/assets/tshirt_artemis_main_picture/variation-files/print/no_locale"
        }
      },
      "locale": null,
      "scope": "print",
      "code": "7/5/8/e/759e39d48va7b42a55002434fd3d7b6cf3189b7f_tshirt_artemis_main_picture_print.jpg"
    }
  ],
  "reference_files": [
    {
      "_link": {
        "download": {
          "href": "https://demo.akeneo.com/api/rest/v1/assets/tshirt_artemis_main_picture/reference-files/no_locale/download"
        },
        "self": {
          "href": "https://demo.akeneo.com/api/rest/v1/assets/tshirt_artemis_main_picture/reference-files/no_locale"
        }
      },
      "locale": null,
      "code": "7/5/8/e/759e39d48va7b42a55002434fd3d7b6cf3189b7f_tshirt_artemis_main_picture.jpg"
    }
  ]
}

Response

OK

lineinteger

Line number

identifierstring

Resource identifier, only filled when the resource is a product

codestring

Resource code, only filled when the resource is not a product

status_codeinteger

HTTP status code, see <a href="/documentation/responses.html#client-errors">Client errors</a> to understand the meaning of each code

messagestring

Message explaining the error