Update or create a retailer product

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
PATCH /api/rest/v1/retailer/products/{code}

Purpose: update one product (one size), or create it when it does not exist yet.

This endpoint works exactly like POST /api/rest/v1/retailer/products: the same required and optional fields, the same rules and the same responses. Use the same value for {code} in the URL and identifier in the body.

Always send the complete product. Values you leave out, such as quantity, name or description, are cleared (see the full list at the create endpoint). price and color are the exception: left out, they keep their current value and the response is 207. To change a single value only, use PATCH /api/rest/v1/retailer/products/{code}/attribute/{attribute_code}.

Sending a deleted product again restores it.

Path parameters

  • code string Required

    The product's identifier (your SKU)

application/json

Body Required

  • identifier string Required

    Your SKU for this product (one size). Allowed characters a-z A-Z 0-9 _ -.

  • parent string

    Your code for the product group (all sizes of one article in one colour). Allowed characters a-z A-Z 0-9 _ -. Generated when left out.

  • category string Required

    One category code from GET /api/rest/v1/retailer/categories/codes

  • enabled boolean

    Leave it out or send true. false is rejected.

    Default value is true.

  • values object Required

    Product values per attribute code. See the Attribute values topic and the required fields of the create endpoint.

    Hide values attribute Show values attribute object
    • * array[object] Additional properties
      Hide * attributes Show * attributes object
      • data

        The value. A string, number, boolean, or for prices a list of {amount, currency}.

      • locale string

        nl_NL or en_US for translatable text attributes, otherwise null

      • scope string

        Not used; leave it out or send null

Responses

  • 201

    Created

  • 202

    Accepted, not created

  • 204

    No content

  • 207 application/json

    Multi-Status

    Hide response attributes Show response attributes object
    • code integer

      Always 207

    • message string

      Summary message

    • skipped_attributes array[object]

      Values that were not saved

      Hide skipped_attributes attributes Show skipped_attributes attributes object
      • attribute string

        Attribute code that was skipped

      • value

        The value you sent

      • reason string

        Why the value was skipped

  • 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

  • 409 application/json

    Conflict

    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

PATCH /api/rest/v1/retailer/products/{code}
curl \
 --request PATCH 'https://content.winkelstraat.nl/api/rest/v1/retailer/products/{code}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{
  "identifier": "TSHIRT-001-BLACK-M",
  "parent": "TSHIRT-001-BLACK",
  "category": "120",
  "values": {
    "manufacturer": [
      {
        "data": "guess",
        "locale": null
      }
    ],
    "manufacturer_product_number": [
      {
        "data": "G1234",
        "locale": null
      }
    ],
    "manufacturer_product_color": [
      {
        "data": "jet black",
        "locale": null
      }
    ],
    "name": [
      {
        "data": "Basic T-shirt",
        "locale": "en_US"
      },
      {
        "data": "Basic T-shirt",
        "locale": "nl_NL"
      }
    ],
    "description": [
      {
        "data": "Cotton T-shirt with a round neck.",
        "locale": "en_US"
      },
      {
        "data": "Katoenen T-shirt met ronde hals.",
        "locale": "nl_NL"
      }
    ],
    "color": [
      {
        "data": "black",
        "locale": null
      }
    ],
    "size": [
      {
        "data": "m",
        "locale": null
      }
    ],
    "ean": [
      {
        "data": "8712345000028",
        "locale": null
      }
    ],
    "price": [
      {
        "data": [
          {
            "amount": "29.95",
            "currency": "EUR"
          }
        ],
        "locale": null
      }
    ],
    "quantity": [
      {
        "data": 10,
        "locale": null
      }
    ],
    "image_default": [
      {
        "data": "https://cdn.example.com/products/tshirt-001-black-front.jpg",
        "locale": null
      }
    ],
    "image_1": [
      {
        "data": "https://cdn.example.com/products/tshirt-001-black-back.jpg",
        "locale": null
      }
    ]
  }
}'
Request examples
{
  "identifier": "TSHIRT-001-BLACK-M",
  "parent": "TSHIRT-001-BLACK",
  "category": "120",
  "values": {
    "manufacturer": [
      {
        "data": "guess",
        "locale": null
      }
    ],
    "manufacturer_product_number": [
      {
        "data": "G1234",
        "locale": null
      }
    ],
    "manufacturer_product_color": [
      {
        "data": "jet black",
        "locale": null
      }
    ],
    "name": [
      {
        "data": "Basic T-shirt",
        "locale": "en_US"
      },
      {
        "data": "Basic T-shirt",
        "locale": "nl_NL"
      }
    ],
    "description": [
      {
        "data": "Cotton T-shirt with a round neck.",
        "locale": "en_US"
      },
      {
        "data": "Katoenen T-shirt met ronde hals.",
        "locale": "nl_NL"
      }
    ],
    "color": [
      {
        "data": "black",
        "locale": null
      }
    ],
    "size": [
      {
        "data": "m",
        "locale": null
      }
    ],
    "ean": [
      {
        "data": "8712345000028",
        "locale": null
      }
    ],
    "price": [
      {
        "data": [
          {
            "amount": "29.95",
            "currency": "EUR"
          }
        ],
        "locale": null
      }
    ],
    "quantity": [
      {
        "data": 10,
        "locale": null
      }
    ],
    "image_default": [
      {
        "data": "https://cdn.example.com/products/tshirt-001-black-front.jpg",
        "locale": null
      }
    ],
    "image_1": [
      {
        "data": "https://cdn.example.com/products/tshirt-001-black-back.jpg",
        "locale": null
      }
    ]
  }
}
Response examples (207)
{
  "code": 207,
  "message": "Product updated with skipped attributes",
  "skipped_attributes": [
    {
      "attribute": "color",
      "value": "darkblue",
      "reason": "The color value darkblue is not supported/disabled"
    },
    {
      "attribute": "size",
      "value": "xxxs",
      "reason": "The size with value 'xxxs' is not supported/disabled"
    }
  ]
}
Response examples (207)
{
  "code": 42,
  "message": "string",
  "skipped_attributes": [
    {
      "attribute": "string",
      "reason": "string"
    }
  ]
}
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 (409)
{
  "code": 409,
  "message": "Could not lock \"wsnl123-TSHIRT-001-BLACK\"; the write was not applied and can be retried"
}
Response examples (409)
{
  "code": 42,
  "message": "string"
}
Response examples (415)
{
  "code": 415,
  "message": "\"xxx\" in \"Content-Type\" header is not valid. Only \"application/json\" is allowed."
}
Response examples (415)
{
  "code": 42,
  "message": "string"
}
Response examples (422)
{
  "code": 422,
  "message": "Invalid category code \"999999\""
}
Response examples (422)
{
  "code": 42,
  "message": "string"
}