[v1] API returns outdated quantity

We are having troubles to determine the available quantity so that the automatic order requests are working. In one of our last calls the TI expert told us to use this API call:

/v1/store/products/{product id}

However the returned quantity seems not to be current. Only when we try to create an order the returning error message shows the actual available quantity in the error message field. I don’t know how we are supposed to automate this if the available quantity is not known. Any order above this quantity is rejected so it is essential to have the exact value.

  • Hi Stephan,

    May we know the quantity you are receiving when calling the Inventory API? I see some recent call for product DP83848TSQ/NOPB from your production account.

    The API calls return 0 quantity which is expected. Are you having different value from this at the time of the call? Is this for another specific product?

  • Hi Stefan,

    We have not heard from you  for some time and we hope this is no longer an issue. Feel free to respond to this thread if you need additional information. Thank you!

  • Hi Keith, I am sorry for the late reply. I had to clarify if I can continue to talk about this on a public forum. 
    The part you mentioned was not an example of this issue as it had enough quantity if I remember correctly. The issue is happening with item which are low in availability. We see i.e. a 500 quantity available then order 100 and after that the api still shows 500 available.
    I will have my colleague here as well to follow up on this case (Oliver Rosenow).

  • Hi Stephan,

    Thanks for raising this. May we know if this is on the test instance. The quantity values on test may not reflect correctly on that environment as simulated .  For production, there is a chance that inventory may have been replenished instantly back to the quantity. We can investigate further if you notice that appears on multiple devices.

    We also have the option to do private messaging if you wish to provide some sensitive information. Please let me know if you if you wish to go to this route. I will need request a friendship (or request a friendship to me) to initiate private messaging.

    Thanks!

  • Dear Keith, this was an observation in the productive environment. There was another observation, low qty available according to products(/store/products) API, trying to order that qty was denied by order(/store/orders) API -> no qty abvailable.

    So the general question for us is: Should we rely on the qty information of the products API at all, if not, where can we get reliable qty information to base our order decision on ?

    Best Regards
    Oliver Rosenow 

  • Hi Oliver,

    Yes please continue to rely information for the API call. The same Quantity should appear on TI store website  This could be a case of timing wherein the low quantity product may have been possibly pickup by others as and it may have become unavailable in between your inventory call and your order call. If do let us be aware if this continue to happen to all low quantity products for your orders. 

  • Dear Keith,
    can you please tell us how fast the qty information is updated for the product info API?
    Example: We got the information via product info that 500 PCE are available, we order them via orders API. Five seconds later we query the product info again -> Were the 500 PCE ordered by us five seconds ago taken into account for the available qty that is now shown?

    Best Regards
    Oliver Rosenow 

  • Hi Oliver,

    Let me reach out to our internal to get an exact value for you and will respond back asap. The latest information we have is that it has its own refresh cycle which could be around a few minutes so there is potentially mismatch on the actual quantities on the API call depending on the timing and other factors such as other buyers ordering/buying the same part.

  • HI Oliver,

    The refresh cycle should be every 30 minutes. Please take this into consideration for your subsequent API calls. Let us know if you need more information. Thank you!

**Attention** This is a public forum