1b.app
Link copied -

How to use your API/box_action_universal_export_order_to_api

There is an action "Pass process to API"
Here https://baza.cn.ua/admin/shop/workflow/9/procedure/68/?status=0
I want to use this action to change the values of my own products
I write in "URL API" = https://baza.cn.ua/api/product/update/?
But something doesn't work
Here are the logs https://baza.cn.ua/admin/logs/showall/ajax/?file=export-order-api-2020-09-30.log
https://baza.cn.ua/admin/logs/showall/ajax/?file=rest-api-product-update-2020-09...
Here is a test order https://baza.cn.ua/admin/customorder/order/16115/edit/
In the logs by order, it writes
[response] => {"status":"error","errors":["You don't have available products for update!","Product not found by "]}
[code] => 200
The product type was not found, but there is a name parameter in the request
Moreover, if you copy the request from the log and paste it into the browser, then everything works
At the same time, it also writes in the product
Original question is available on version: ru

Answers:

To update a product, you need to pass something unique, for example: an article, an external id, or an id in the system. By name, the product is not searched for and should not be. Try to send one of the above.
01.10.2020, 10:14
Original comment available on version: ru

Куприян Владислав Валерьевич
Baza.cn.ua / Integrator (FOP Kupriyan)

Bodyako Dmitry Employee wrote:
To update a product, you need to pass something unique, for example: an article, an external id, or an id in the system. By name, the product is not searched for and should not be. Try to send one of the above.

In action, I pass the ID and the logs show https://prnt.sc/ur48fu
01.10.2020, 12:02
Original comment available on version: ru

https://prnt.sc/ur4cio id is not passed, only ?id is passed. Those. you in action provided the link
https://baza.cn.ua/api/product/update/?
but you need https://baza.cn.ua/api/product/update/
01.10.2020, 12:09
Original comment available on version: ru

Куприян Владислав Валерьевич
Baza.cn.ua / Integrator (FOP Kupriyan)

Bodyako Dmitry Employee wrote:
https://prnt.sc/ur4cio id is not passed, only ?id is passed. Those. you in action indicated the link https://baza.cn.ua/api/product/update/? and you need https://baza.cn.ua/api/product/update/

Wow, thank you very much, something worked, I'll test everything the other day, it didn't work like that before :)
01.10.2020, 12:14
Original comment available on version: ru

and where can I see these logs for orders or products?
01.10.2020, 18:30
Original comment available on version: ru


Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment