"Item not Update. The ItemShop record with shopID 0 cannot have its qoh field changed." Error
Despite many efforts, I cannot seem to stop getting this error. I've combed the forums and understand how the multiple shop entries work. However, even after specifying in the payload
shopId: 1, it still insists on attempting to update
Delivering the same, exact payload through Postman - everything works fine.
Here's a list of curlopts set in the code (PHP 7.4):
CURLOPT_URL => 'https://api.lightspeedapp.com/API/Account/<ACCT ID>/Item/<Item ID>.json?load_relations=["ItemShops"]', CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30 CURLOPT_HTTPHEADER => [ "Content-Type: application/json", "Authorization: Bearer " . <AUTH TOKEN> ]
And here's the json'ed payload:
Everything I could find on the error showed the user trying to update
shopId: 0, so I'm not quite sure where I'm going wrong.
Can anyone advise? Thanks!