not able to update products

in Development
We have been using this endpoint for a while:
rest/inventory/product/{productid}
and PATCHing the name field.
This seems to have suddenly stopped working and now returns 400 BAD Request - Invalid ID.
This is with the same IDs we have been using and that came from your system.
calling the same endpoint using GET and without a product ID still works and I can verify the IDs are there.
20 comments
Hi @almostEric,
Thank you for contacting us.
Can you show me some more information like requests, payloads and responses?
This is the endpoint
rest/inventory/product/{productId}"
The product ID in question comes from a previous GET call.
This is the payload: {{"op", "replace"}, {"path", "name"}, {"value", parentItemName}};
The error is 404 -NOT FOUND, invalid product ID.
We have been using this endpoint for quite a while and it worked fine. Seems to have suddenly stopped.
Another endpoint we use :
rest/financial/receipt
Is now giving us 400 - BAD REQUEST errors. This endpoint had been working for months.
So based on the error message this product doesn't exists any more, maybe the product is deleted?
For
rest/financial/receipt
endpoint, you need required params.For example:
/rest/financial/receipt?date=2021-01-26
I can assure you that it is not deleted
Can you share me the companyID, server and productID so I can take a look?
Hi Lucien,
With the new OAUTH setup I'm not sure what the company Id and server are (I guess I could call those endpoints and find out, but they aren't needed in our business case).
The company is called Bru City Texas, hopefully you can find them.
Any of these productIDs would be worth taking a look at:
parent: 1850465
5oz: 1665260
9oz: 1850461
13oz: 1854050
16oz: 1850462
32oz: 1850463
64oz: 1850464
any update?
I've checked the productIDs and this is the result
1850465 not found, could be deleted.
All other IDs are good
strange, because when I do a GET product list, this is included:
{
"id": 1850465,
"name": "Tap 1",
"visible": true,
"imageLocation": "",
"kitchenImageLocation": "",
"cfdImageLocation": "",
"price": 0,
"priceWithoutVat": 0,
"takeawayPrice": 0,
"takeawayPriceWithoutVat": 0,
"deliveryPrice": 0,
"deliveryPriceWithoutVat": 0,
"productType": "CHOICE",
"sku": "T1",
"taxClass": "BUILTIN-8.25",
"deliveryTaxClass": "BUILTIN-0.00",
"takeawayTaxClass": "BUILTIN-0.00",
"stockAmount": 0,
"groupIds": [
908371,
921611
],
"info": ""
}
Can you show me your URL?
rest/inventory/product/
When I look for the sku:T1 I get this:
look at name instead of sku, although I think customer has manually changed the names just to get things working
So could it be possible that the customer deleted the product with ID 1850465 and create the product again, so it automatically gets a new ID.
no, I still see it there.
The customer has not deleted any products. It is just a name that got changed.
and he only changed the name after we could not get this working
But can you explain to me why I can't find any products with that ID?
that is what we are wondering too
I'll check in and see if he has made any more changes lately
Okay, very weird then, please let me know if the client changed something.