您的参数中可能缺少一个键:值对。
尝试使用带有 Postman 的 akeneo api 来查看 api 的输入和输出。
链接到 api 文档 => https://api.akeneo.com/getting-started/your-first-tutorial-4x/welcome.html
这是我通过邮递员采取的示例,它可能会让您更好地了解 api Product Post 的外观。
{
"identifier": "new_product",
"family": "tshirts",
"groups": [],
"parent": null,
"categories": [
"tvs_projectors"
],
"enabled": true,
"values": {
"clothing_size": [
{
"locale": null,
"scope": null,
"data": "s"
}
],
"description": [
{
"locale": "en_US",
"scope": "mobile",
"data": "Akeneo T-Shirt"
},
{
"locale": "en_US",
"scope": "print",
"data": "Akeneo T-Shirt with short sleeve"
}
],
"main_color": [
{
"locale": null,
"scope": null,
"data": "black"
}
],
"name": [
{
"locale": null,
"scope": null,
"data": "Akeneo T-Shirt black and purple with short sleeve"
}
],
"secondary_color": [
{
"locale": null,
"scope": null,
"data": "purple"
}
],
"tshirt_materials": [
{
"locale": null,
"scope": null,
"data": "cotton"
}
],
"tshirt_style": [
{
"locale": null,
"scope": null,
"data": [
"crewneck",
"short_sleeve"
]
}
],
"price": [
{
"locale": null,
"scope": null,
"data": [
{
"amount": 10,
"currency": "EUR"
},
{
"amount": 14,
"currency": "USD"
}
]
}
]
},
"created": "2017-03-30T14:55:26+02:00",
"updated": "2017-05-04T23:56:09+02:00",
"associations": {
"SUBSTITUTION": {
"groups": [],
"products": [
"AKNSTK"
]
}
}
}