Important - changes to ItemShop for negative inventory

Alex LugoAlex Lugo Posts: 136Administrator, Lightspeed Staff moderator

Our Lightspeed Retail developers have some good news!


Our team is working on supporting negative inventory on oversold or over-removed items through transfers and vendor returns. This new feature will incur the following changes to Lightspeed Retail’s item API endpoint.

1. The existing qoh field under ItemShop will display as negative if the item’s quantity on hand is negative as a result of sales, transfers or vendor returns. However, the qoh field cannot be updated to a negative value through the API.

2. A new read-only field called sellable will display the quantity of stock that a shop has available to sell. If you are connecting Lightspeed Retail to a solution that does not support negative inventory, this is the field you’ll want to use to fetch an Item’s stock.

Note: If you are looking at the ItemShop aggregate, the qoh field is the net total of all shops’ quantity on hand including any shops with negative inventory levels. The sellable field is an aggregate of all shops’ sellable stock and does not include shops with negative quantities in the calculation.


The BETA for the new negative inventory feature will begin with up to 100 customer accounts on April 3rd. However, all active accounts will have the new sellable field on April 3rd.


Please see the example response below.

{
  "@attributes": {
    "count": "1"
  },
  "Item": {
    "itemID": "19",
    "systemSku": "210000000019",
    "ItemShops": {
      "ItemShop": [
        {
          "itemShopID": "57",
          "qoh": "12",
          "sellable": "12",
          "backorder": "0",
          "componentQoh": "0",
          "shopID": 1,
          ...
        },
        {
          "itemShopID": "58",
          "qoh": "-5",
          "sellable": "0",
          "backorder": "0",
          "componentQoh": "0",
          "shopID": 2,
          ...
        },
        {
          "itemShopID": "56",
          "qoh": "7",
          "sellable": "12",
          "backorder": "0",
          "componentQoh": "0",
          "shopID": 0,
          ...
        }
      ]
    },
    "Prices": {
      "ItemPrice": [
      ...
      ]
    }
  }
}


Alex Lugo
API Support Specialist
Lightspeed HQ

3 comments

  • gregaricangregarican Posts: 290Member 

    When will the negative inventory changes hit the front-end web and iOS clients?

  • Alex LugoAlex Lugo Posts: 136Administrator, Lightspeed Staff moderator

    Hi @gregarican,

    General Availability hasn't been set. We will work with Beta customer in an effort to release it to the rest of our customer by the end of summer.

    Alex Lugo
    API Support Specialist
    Lightspeed HQ
  • gregaricangregarican Posts: 290Member 

    Great! I'll keep an eye out and apprise our staff of the pending changes.


    On a side note, this probably isn't the best place to put this. But working with API a lot it would be great if there were consistent behavior in passing back responses that have JSON array values.


    For example, if I'm parsing an array of product tags, I expect to see the JSON array values in brackets. But if there is only a single tag value, the JSON array value doesn't have brackets.

    "Tags":{"@attributes":{"count":"5"},"tag":["2000-to-5000","earrings","store-5a","yellow-gold","women"]}}}

    versus

    "Tags":{"@attributes":{"count":"1"},"tag":"women"}}}

    In order to gracefully work around this I have implemented custom JSON response handlers, but it'd be nice to not have to remember that extra gotcha :)

Sign In or Register to comment.