Add product stock through API
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 14
- Joined: 09 Jun 2021, 15:06
Add product stock through API
Hello, I have asked a few questions regarding the Aimeos JSON API and you've always been helpful here, so here I am again.
I use a call to the Aimeos API like this to create a text:
https://MYURL/admin/default/jsonadm/text?_token=" + csrf
with JSON body like this:
"{
"""data"": {
"""type"": ""text"",
"""attributes"": {
"""text.type"": ""short"",
"""text.label"": " + (char)34 + textLabel + (char)34 + ",
"""text.content"": " + (char)34 + textContent + (char)34 + ",
"""text.editor"": " + (char)34 + editor + (char)34 + "
"}
"}
"}";
Which works as expected. How can I use the API to create a stock entry for a product?
Thank you!
I use a call to the Aimeos API like this to create a text:
https://MYURL/admin/default/jsonadm/text?_token=" + csrf
with JSON body like this:
"{
"""data"": {
"""type"": ""text"",
"""attributes"": {
"""text.type"": ""short"",
"""text.label"": " + (char)34 + textLabel + (char)34 + ",
"""text.content"": " + (char)34 + textContent + (char)34 + ",
"""text.editor"": " + (char)34 + editor + (char)34 + "
"}
"}
"}";
Which works as expected. How can I use the API to create a stock entry for a product?
Thank you!
Re: Add product stock through API
There's also an URL for managing stock levels:
https://MYURL/admin/default/jsonadm/stock?_token= + csrf
Here are the supported properties for updating:
https://github.com/aimeos/aimeos-core/b ... #L177-L181
https://MYURL/admin/default/jsonadm/stock?_token= + csrf
Here are the supported properties for updating:
https://github.com/aimeos/aimeos-core/b ... #L177-L181
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 14
- Joined: 09 Jun 2021, 15:06
Re: Add product stock through API
Thank you very much. It didn't work for me, but I will try again since now I know that it should work and the problem is on my side.
Thanks again!
Thanks again!