peeter123 / digikey-api

Python module for the Digikey PartSearch API
GNU General Public License v3.0
85 stars 35 forks source link

Product details Quantity on Order always return 0 #35

Closed tawseefpatel closed 1 year ago

tawseefpatel commented 1 year ago

hello,

ive been working with the digikey api and have been trying to retrieve the quantity on order for parts in my list that are not in stock. i have noticed that a lot of these when checked manually have a quantity on order however, through the api call:

part = digikey_api.product_details(part_number, x_digikey_locale_site='CA', x_digikey_locale_language='en', x_digikey_locale_currency='CAD') print(x.quantity_on_order)

i am always receiving 0. For example with the part: ADT6402SRJZ-RL7 i can see that by checking on the website through the check lead time button there will be some available in jun 2023. is this only a result of now + lead_time?

eeintech commented 1 year ago

Well the current stock is 0, this tool is not supposed to read in the future, lead-time is only informative of possible stock coming in and doesn't mean it will be stocked by that date... So the result of the call is fine, not sure why you expect it to return otherwise :thinking:

tawseefpatel commented 1 year ago

https://developer.digikey.com/products/product-information/partsearch/productdetails if you take a look at this link here, under the product details tab in the model section, I am specifically looking for the 'quantity on order'.

QuantityOnOrder | integer($int32) |  example: 0  |  Quantity of this product ordered but not immediately available.

hope that clears things up

eeintech commented 1 year ago

"Quantity on order" means that Digi-Key placed an order with the part vendor, this is not the case for the part you pointed out. Again they don't have stock or order for this part, just a vague lead-time.