Updating Warehouse Stock via Web API

Saturday, December 28, 2024 12:54:31 PM
  • Posted: Tuesday, May 21, 2019 4:38 AM
  • 25
Hi.  We’re trying to use Web API method /odata/product('id')UpdateStock, but StockQuantity in ProductWarehouseInventory is not updated.

For the product we are testing, UseMultipleWarehouses is set to “true” and has existing inventory like this:

"ProductWarehouseInventory": [{"_id": "5cc3cdeb06606e00011f0532", "WarehouseId": "5c6697183945712d04312fc8", "StockQuantity": 10,             "ReservedQuantity": 0}],

We are sending the following body, and receive  HTTP/1.1 200 OK.  {"WarehouseId": "5c6697183945712d04312fc8", "Stock": "123"}

However StockQuantity is not updated for this product.


More info:
ProductID: 5cc3cde406606e00011f03f8
API REQUEST = POST TO http://[webstoreurl]/odata/product('5cc3cde406606e00011f03f8')/UpdateStock
API RESULT: = HTTP/1.1 200 OK {"@odata.context": "http://[webstoreurl]/odata/$metadata#Edm.Boolean", "value": true }

Do you have any suggestions why this fails?

0
  • Posted: Tuesday, May 21, 2019 7:55 AM
  • 953
Hi,

Thank you for reporting, we will investigate it. Here is the work item.
Best regards,
Patryk

GrandNode Team
0
  • Posted: Tuesday, May 21, 2019 9:12 AM
  • 953
Hi,

We've fixed the error. You can check it on GitHub in mentioned work item.
Best regards,
Patryk

GrandNode Team
0
  • Posted: Tuesday, May 21, 2019 11:56 AM
  • 25
Thanks a lot, I'm impressed how quick u found & fixed that.

Thanks for great support as always!
0
back to top
Filters