Upload an image

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://content.doc.winkelstraat.nl/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Content API MCP server": {
    "url": "https://content.doc.winkelstraat.nl/mcp"
  }
}

Close
POST /api/rest/v1/retailer/media-files

Purpose: add an image to a product group, as a file upload or by URL. The image is stored straight away, and download problems are reported in the response.

As an alternative you can send image URLs in the product itself; see the Images topic for both options and for the image requirements.

Required fields (multipart form)

Field Expected value
parent The parent of the product group, exactly as you sent it with the product. The product must exist.
attribute The image attribute: image_default (main image) or image_1, image_2, ….
file or url Either the image file, or a public URL of the image. Send exactly one of the two.

Example

curl -X POST https://content.winkelstraat.nl/api/rest/v1/retailer/media-files \
  -H "Authorization: Bearer <access_token>" \
  -F "parent=TSHIRT-001-BLACK" \
  -F "attribute=image_default" \
  -F "url=https://cdn.example.com/products/tshirt-001-black-front.jpg"

Responses

  • 201

    Created

  • 401 application/json

    Authentication required

    Hide response attributes Show response attributes object
    • code integer

      HTTP status code

    • message string

      Message explaining the error

  • 403 application/json

    Access forbidden

    Hide response attributes Show response attributes object
    • code integer

      HTTP status code

    • message string

      Message explaining the error

  • 415 application/json

    Unsupported Media type

    Hide response attributes Show response attributes object
    • code integer

      HTTP status code

    • message string

      Message explaining the error

  • 422 application/json

    Unprocessable entity

    Hide response attributes Show response attributes object
    • code integer

      HTTP status code

    • message string

      Message explaining the error

POST /api/rest/v1/retailer/media-files
curl \
 --request POST 'https://content.winkelstraat.nl/api/rest/v1/retailer/media-files' \
 --header "Authorization: $API_KEY"
Response examples (401)
{
  "code": 401,
  "message": "The access token provided is invalid."
}
Response examples (401)
{
  "code": 42,
  "message": "string"
}
Response examples (403)
{
  "code": 403,
  "message": "Access forbidden. You are not allowed to list products."
}
Response examples (403)
{
  "code": 42,
  "message": "string"
}
Response examples (415)
{
  "code": 415,
  "message": "\"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,
  "message": "Failed to download 'https://cdn.example.com/products/missing.jpg': Client error: `GET https://cdn.example.com/products/missing.jpg` resulted in a `404 Not Found` response"
}
Response examples (422)
{
  "code": 42,
  "message": "string"
}