Error with updating quantity via API

meatcomputermeatcomputer Member Posts: 24

I haven't updated my code for many months so I'm assuming something changed on in the API.

I keep getting the error "{"httpCode":"400","httpMessage":"Bad Request","message":"Item not Update. The ItemShop record with shopID 0 cannot have its qoh field changed.","errorClass":"Exception"}'

I am sending a put request to:` 


With the payload:

       quantity_info = { "ItemShops": {

           "ItemShop": [{


               "qoh": 1


But I keep on getting the same error. Any ideas?

1 comment

  • gregaricangregarican Member Posts: 908 

    shopID 0 is a read-only calculated entity, that represents the aggregate sum of all shops. So let's say you have shopID 1 with 3 on-hand, and shopID 2 with 2 on-hand. Then that would mean shopID 0 would show 5 on-hand as the total.

    Check your case-sensitivity and check you aren't trying to update a value in the read-only shopID 0. Details here -->

Sign In or Register to comment.