Jump to content

API change stock quantity of a product


Recommended Posts

Cheers.

I am trying to update the stock of my store via web api (Without PHP). When I attack this endpoint https://devdocs.prestashop.com/1.7/webservice/resources/stock_availables/ with the PUT method when I ready the item it disappears and stock_availables is deleted. How can I update the stock of an item?

This is what I am sending 

Method PUT

https://store/api/stock_availables?ws_key=KEY

<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
  <stock_available>
    <id><![CDATA[70841]]></id>
    <id_product><![CDATA[48163]]></id_product>
     <id_product_attribute><![CDATA[0]]></id_product_attribute>
    <quantity><![CDATA[25]]></quantity>
    <depends_on_stock><![CDATA[0]]></depends_on_stock>
    <out_of_stock><![CDATA[0]]></out_of_stock>
  </stock_available>
</prestashop>

Version: 1.7.5.2

Thank you very much.

Link to comment
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...