younifyd
Menu

Post Category Media File

Create a category media file

POST/api/rest/v1/category-media-files

Use it in a workflow

  1. Add a step and choose the Akeneo connector.
  2. Pick the Post Category Media File action (under Category).
  3. Fill in the fields below, then reference the result from later steps as {{postCategoryMediaFile.response.data}}.

Request

Headers

Content-Typestringrequired

Equal to 'multipart/form-data' (with [boundary value](https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2)), no other value allowed.

Request body

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

categorystringrequired

The category to which the media file will be associated. It is a JSON string that follows this format: '{"code":"category code", "attribute_code":"attribute code", "channel":"channel code or null", "locale":"locale code or null"}'.

filestring (binary)required

The media file to be uploaded. It should be provided as a binary file. Ensure that the file format is supported by the system.

json
{
  "category": "{\"code\":\"ecomm\", \"attribute_code\":\"image_1\", \"channel\":\"ecommerce\", \"locale\":\"en_US\"}",
  "file": ""
}

Response

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

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

Post Category Media File — Akeneo — Documentation