marello
marello copied to clipboard
Validation error when creating product with prices via API
The request to POST /api/rest/v1/products with body:
{
"id": null,
"name": "Test",
"sku": "123",
"desiredStockLevel": 0,
"purchaseStockLevel": 0,
"replenishment": "end_of_life",
"status": null,
"createdAt": null,
"updatedAt": null,
"prices": [{
"currency": "CHF",
"value": "100.0000"
}],
"inventoryItems": [],
"channels": []
}
results in 400 Bad Request:
{
"code": 400,
"message": "Validation Failed",
"errors": {
"children": {
"replenishment": {},
"name": {},
"sku": {},
"status": {},
"weight": {},
"desiredStockLevel": {},
"purchaseStockLevel": {},
"prices": {
"errors": ["This value is not valid."]
},
"channels": {},
"inventoryItems": {}
}
}
}
Hi @pkraeutli,
Thanks for reporting. I will investigate further on the issue with prices validation. I'll keep you posted on any results I might find.
Kind Regards,
Jaimy Casteleijn