Adding/Updating Inventory through API

Sai7856Sai7856 Member Posts: 5

Here my scenario is i need to update the inventory to existing item through API from another system. can i get help of endpoint which is going to affect the quantity of item in Lightspeed through API

Thanks &Regards

Sai

5 comments

  • Sai7856Sai7856 Member Posts: 5

    Thankyou,

    iam using this json for adding inventory

    "ItemShops": {

    "ItemShop": {

    "itemShopID": 138,

    "shopID": 0,

    "qoh": 100

    }

    }

    }

    Even it was getting error that item not updated. Please check this

  • gregaricangregarican Member Posts: 521 

    shopID 0 is the read-only summation of all "real" shop on-hands. You can't add/modify this one. Reference the shopID's for your real shops.

  • Sai7856Sai7856 Member Posts: 5

    I have tried the shopID's for my real shops, but only one field is not getting updated!

    "qoh": 100

    kindly help me with this field update.

    Thanks

  • gregaricangregarican Member Posts: 521 

    Aren't you missing the braces? Typically when I am looking to create a new PUT or POST request for an API endpoint I issue a GET request to see the formatting the API endpoint is looking for. Maybe try this, and let me know the outcome!

    "ItemShops": {

    "ItemShop":[ {

    "itemShopID": aValidItemShopID,

    "shopID": aValidShopID,

    "qoh": 100

    }]

    }

    }

Sign In or Register to comment.