Update/create a retailer product
This endpoint allows you to create/update a new product for a retailer.
Path parameters
-
Code of the resource
Body Required
-
Child product identifier, i.e. child sku. A unique value to reference a single product.
-
Product group identifier, i.e. sku. A unique value to reference a group of products with different sizes.
-
enabled boolean
Whether the product is enable.
Default value is
true
. -
Category code in which the product is classified
-
values object
Product attributes values. Valid global product attribute codes are: 'size', 'color', 'retailer', 'ean'. Valid local product attribute codes are: 'manufacturer_product_number' ,'ean'.
-
created string(dateTime)
Date of creation
-
updated string(dateTime)
Date of the last update
PATCH /api/rest/v1/retailer/products/{code}
curl \
-X PATCH https://content.winkelstraat.nl/api/rest/v1/retailer/products/{code} \
-d '{"identifier":"top_child_size_m","enabled":true,"category":"120","parent":"top","values":{"name":[{"data":"Top","locale":"en_US"},{"data":"Topje","locale":"nl_NL"}],"description":[{"data":"Summer top","locale":"en_US"},{"data":"Zomer top","locale":"nl_NL"}],"price":[{"data":[{"amount":"15.5","currency":"EUR"}]}],"manufacturer":[{"data":"guess"}],"manufacturer_product_number":[{"data":"G1234"}],"color":[{"data":"black"}],"size":[{"data":"m"}]}}'
Request example
{
"identifier": "top_child_size_m",
"enabled": true,
"category": "120",
"parent": "top",
"values": {
"name": [
{
"data": "Top",
"locale": "en_US"
},
{
"data": "Topje",
"locale": "nl_NL"
}
],
"description": [
{
"data": "Summer top",
"locale": "en_US"
},
{
"data": "Zomer top",
"locale": "nl_NL"
}
],
"price": [
{
"data": [
{
"amount": "15.5",
"currency": "EUR"
}
]
}
],
"manufacturer": [
{
"data": "guess"
}
],
"manufacturer_product_number": [
{
"data": "G1234"
}
],
"color": [
{
"data": "black"
}
],
"size": [
{
"data": "m"
}
]
}
}
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 ‘application/json’ 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"
}