Create a new media file
This endpoint allows you to create a new media file and associate it to an attribute value of a given retailer product.
Headers
-
Equal to 'multipart/form-data', no other value allowed
POST /api/rest/v1/retailer/media-files
curl \
-X POST https://content.winkelstraat.nl/api/rest/v1/retailer/media-files \
-H "Content-type: string" \
-d '{"parent":"string","attribute":"string","file":"@file","url":"string"}'
Request example
# Headers
Content-type: string
# Payload
{
"parent": "string",
"attribute": "string",
"file": "@file",
"url": "string"
}
Response examples (400)
Code
400
"Invalid JSON message received"
Response examples (400)
{
"code": 42,
"message": "string"
}
Response examples (401)
Code
401
"Authentication is required"
Response examples (401)
{
"code": 42,
"message": "string"
}
Response examples (403)
Code
403
"Access forbidden. You are not allowed to list categories."
Response examples (403)
{
"code": 42,
"message": "string"
}
Response examples (415)
Code
415
"‘xxx’ in ‘Content-type’ header is not valid. Only ‘multipart/form-data’ is allowed."
Response examples (415)
{
"code": 42,
"message": "string"
}
Response examples (422)
Code
422
"Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation."
{
"documentation": {
"href": "http://api.akeneo.com/api-reference.html"
}
}
Response examples (422)
{
"code": 42,
"message": "string"
}