Product media file

Create a new product media file

This endpoint allows you to create a new media file and associate it to an attribute value of a given product or product model.

post/api/rest/v1/media-files

Request

  • Base URL
    http://demo.akeneo.com
  • Auth
    none declared. Required headers: Content-type

Headers

Content-typestring required

Equal to 'multipart/form-data', no other value allowed

Request body

productstring

The product to which the media file will be associated. It is a JSON string that follows this format '{"identifier":"product_identifier", "attribute":"attribute_code", "scope":"channel_code","locale":"locale_code"}'. You have to either use this field or the product_model field, but not both at the same time.

product_modelstring

The product model to which the media file will be associated. It is a JSON string that follows this format '{"code":"product_model_code", "attribute":"attribute_code", "scope":"channel_code","locale":"locale_code"}'. You have to either use this field or the product field, but not both at the same time.

filestring binary required

The binaries of the file

Response

Created

Changes

No recorded changes to this operation across all 70 revisions of this API.