AbanteCart Development > API Development

Updating stock via API?

(1/1)

AA_RON:
Hey all! I was looking to update the stock quantities of my products using the API after I import all the products. Was planning on using a google sheets to keep track and easily update the stock levels. Is this possible?

Cheers!

abolabo:
sure. All that you need it's a your own api controller that will do all you want.
Then you should enable admin api in the settings and set api key to authorize.
After login you will get token and then you can ask your controller by route.

MarkOrion:
The API response is a status code 200, but the qty on the product does not change.

 

    request method: PUT
    json payload: [{"product_id":"395","inventory_level":55}]

     
    response status code: 200

Navigation

[0] Message Index

Go to full version
Powered by SMFPacks Social Login Mod