My stock dosen't change when I create an order with Api

Anonymous
Not applicable

Hello,

I am developing a tool that communicates with API (Prestashop API) using Python. When I try to create an order with a product, everything seems to work fine, but the quantity of the product does not change. I have tried everything, but nothing seems to work.

Details:
Order creation successful with the specified product Stock remains the same

As a trial account, am I able to modify stock through the API? Is there anything wrong with my code?

 


order_find = shopify.Order.find() print(order_find) if len(order_find) >= 1: for ord in order_find: if ord.source_identifier == order['increment_id']: print('La commande est déjà existante') break else: print('La commande vient d\'etre créer') response = orderS.save() print(response) else: print('La commande vient d\'etre créer') response = orderS.save() print(response) 

 

Thank you 

Replies 0 (0)