I've been trying to POST an Item to XERO but I'm getting the Error17 message that a lot of people seem to have faced, however I've not managed to find a solution here.
I'm using Power Automate to construct the API call and I've been able to GET the Items with no problem, so I know my authorisation is working.
The raw post data as sent is like this (simplified to the most basic item as described on the API page):
{
"uri": "https://api.xero.com/api.xro/2.0/Items",
"method": "POST",
"headers": {
"Authorization": "*sanitized*",
"xero-tenant-id": "######-dd54-40f3-8b47-831b65ee7b78\n",
"Content-Type": "application/json"
},
"body": {
"Code": "Item-1"
}
}
I've also tried adding { "Items": [ before the actual item but I get the same error, which is:
"body": {
"ErrorNumber": 17,
"Type": "NoDataProcessedException",
"Message": "No data has been processed for this endpoint. This endpoint is expecting Item data to be specifed in the request body."
}
Any help very much appreciated.