I'm reporting a Bug
Just updated to latest official 1.7 community.
API access is working, I can list and create products.
Using the PATHC method to update products I'm getting an error about the content type. Sending
PATCH /api/rest/v1/products HTTP/1.1
Host: myakeneo.test.it
Content-Type: application/json
Authorization: Bearer YjFkODg2MDRmNTgyNWE2Zjg4YjliMWE5MWI4ZDk1ODU5YjFjZjA1OGQ3MzA5Nzg3ZGNlM2ZlNDkxOWViOTI0YQ
Cache-Control: no-cache
Postman-Token: 2574016d-6a4f-efe1-0167-4f0cbfd547b8
{
"identifier": "testblu",
"enabled": true,
"family": null,
"categories": [
"originali_as400"
],
"groups": [],
"variant_group": null,
"values": {
"nome_articolo": [
{
"data": "test blu it as",
"locale": "it_IT",
"scope": "as400"
},
{
"data": "test blu it b2b",
"locale": "it_IT",
"scope": "acme_b2b"
}
]
},
"associations": []
}
I'm getting the error
{
"code": 415,
"message": "\"application/json\" in \"Content-Type\" header is not valid. Only \"application/vnd.akeneo.collection+json\" is allowed."
}
Trying with the reported "application/vnd.akeneo.collection+json" I get only "Syntax error"
'+' sign?
The route used to update à single product is not the good one. In your example, the route is used to update multiple products in one request (this route use a specific content).
If you want to update one product by request, please add the identifier at the end if your route.
/api/rest/v1/products/{identifier}
Thanks to all, sorry for the wrong report.
Most helpful comment
Thanks to all, sorry for the wrong report.