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.
Body
Required
-
Your SKU for this product (one size). Allowed characters
a-z A-Z 0-9 _ -. -
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. -
One category code from
GET /api/rest/v1/retailer/categories/codes -
Leave it out or send
true.falseis rejected.Default value is
true. -
Product values per attribute code. See the Attribute values topic and the required fields of the create endpoint.
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
}
]
}
}'
{
"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
}
]
}
}
{
"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"
}
]
}
{
"code": 42,
"message": "string",
"skipped_attributes": [
{
"attribute": "string",
"reason": "string"
}
]
}
{
"code": 401,
"message": "The access token provided is invalid."
}
{
"code": 42,
"message": "string"
}
{
"code": 403,
"message": "Access forbidden. You are not allowed to list products."
}
{
"code": 42,
"message": "string"
}
{
"code": 409,
"message": "Could not lock \"wsnl123-TSHIRT-001-BLACK\"; the write was not applied and can be retried"
}
{
"code": 42,
"message": "string"
}
{
"code": 415,
"message": "\"xxx\" in \"Content-Type\" header is not valid. Only \"application/json\" is allowed."
}
{
"code": 42,
"message": "string"
}
{
"code": 422,
"message": "Invalid category code \"999999\""
}
{
"code": 42,
"message": "string"
}