How can I update the reorderPoint/reorderLevel in the first Object of the ItemShop array?

darryl_ssdarryl_ss Member Posts: 116
edited March 2021 in Development

Hi,

I want to be able to update the reorderPoint and reorderLevel on items.

ItemShops.ItemShop contains two objects, I need to update the first object in the ItemShop Array.

When I PUT the following:

{
	"ItemShops": {
		"ItemShop": [
			{
				"reorderLevel": "2"
			}
		]
	}
}

This targets the second object in the array. How can I PUT to the first please?

---

If I do this by first finding the itemShopID from ItemShop, what URL do I use to PUT to the correct ItemShop, I've tried with:

https://api.lightspeedapp.com/API/Account/218964/Item/301.json?load_relations=["ItemShops"]&itemShopID=902
https://api.lightspeedapp.com/API/Account/218964/Item/301.json?load_relations=["ItemShops"]&itemShopID=902

{	
  "reorderLevel": "3"
}

I've also tried with this:

https://api.lightspeedapp.com/API/Account/218964/Item/301.json?load_relations=["ItemShops"]&shopID=1
https://api.lightspeedapp.com/API/Account/218964/Item/301.json?load_relations=["ItemShops"]&ItemShops.shopID=1

{	
  "reorderLevel": "3"
}
Post edited by darryl_ss on
Tags:

2 comments

Sign In or Register to comment.