Project Home
Manuals
Contact Us
Download
Demo
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
AbanteCart v
1.4.0
is released.
Home
Help
Search
Calendar
Login
Register
AbanteCart Community
»
AbanteCart Development
»
API Development
»
Updating stock via API?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Updating stock via API? (Read 8964 times)
AA_RON
Newbie
Posts: 3
Karma: +1/-0
Updating stock via API?
«
on:
March 11, 2021, 04:00:10 PM »
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!
Logged
abolabo
core-developer
Administrator
Hero Member
Posts: 2068
Karma: +327/-13
web for all, all for web!
Re: Updating stock via API?
«
Reply #1 on:
March 12, 2021, 02:52:54 AM »
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.
Logged
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens
MarkOrion
Newbie
Posts: 3
Karma: +1/-1
Re: Updating stock via API?
«
Reply #2 on:
April 26, 2021, 08:53:29 AM »
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
Logged
Print
Pages: [
1
]
« previous
next »
AbanteCart Community
»
AbanteCart Development
»
API Development
»
Updating stock via API?
Powered by SMFPacks Social Login Mod