Jump to content
rhythm

Checking product quantity with WebService

Recommended Posts

Hello,

I am having trouble with WebService API. Endpoint /api/products/ gives "stock_availables" id's to deal with it I suppose.

The thing I am trying to do - retrieve all of the products information using /api/products/?display=full and check which product is available and not. I can't do additional requests for every product on the list. Variables like - quantity (always '0'), available_for_order, available_now, available_later (empty strings) are always the same and are not affected by product stock status. I don't need to even know the  exact quantity, only if it's in stock.

Edited by rhythm (see edit history)

Share this post


Link to post
Share on other sites

Anyone? The API documentation is so bad it's almost impossible to find anything

Share this post


Link to post
Share on other sites

 

On 5/28/2019 at 2:00 PM, rhythm said:

Hello,

I am having trouble with WebService API. Endpoint /api/products/ gives "stock_availables" id's to deal with it I suppose.

The thing I am trying to do - retrieve all of the products information using /api/products/?display=full and check which product is available and not. I can't do additional requests for every product on the list. Variables like - quantity (always '0'), available_for_order, available_now, available_later (empty strings) are always the same and are not affected by product stock status. I don't need to even know the  exact quantity, only if it's in stock.

I know this is an old thread but the stock is in another table different from product, as well as product combinations if it has combinations, so you need to find first the product ID, go to the attribute table and check the combinations made with the product ID, and finally check the stock_available for each combination.

 

It's a little confusing but it's kinda easy when you know the structure (which is not described in the documentation, where you can find absolutely nothing)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More