1b.app
Link copied -

Pardon for the daily userid

Good afternoon.
If I pass an array of data without a userid, then I show a pardon (contact / update contact)
Fatal error: Uncaught OneBoxOSAPIv2_Exception: Invalid json response in /var/www/sambag/test.sambag.com.ua/system/helper/onebox/OneBoxAPI.php:64 Stack trace: #0 /var/www/sambag/test. sambag.com.ua/system/helper/onebox/OneBoxAPI.php(5): OneBoxAPI->_request('POST', 'api/v2/contact/...', Array, false, '58104193b30a78f...' ) #1 /var/www/sambag/test.sambag.com.ua/system/helper/onebox/onebox.php(14): OneBoxAPI->request('POST', 'api/v2/contact/... ', Array) #2 /var/www/sambag/test.sambag.com.ua/system/helper/onebox/onebox.php(3): set_request(Array, 'api/v2/contact/...') #3 /var/www/sambag/test.sambag.com.ua/admin/model/customer/customer.php(549): set_client(Array) #4 /var/www/sambag/test.sambag.com.ua /admin/model/customer/customer.php(54): ModelCustomerCustomer->updateDataInOneBox('1', Array) #5 ->editCustomer('1&
Original question is available on version: ru

Answers:

Hello, API v2 does not return this error, you may be using third-party code in which additional response processing.
There is a Try it out button in the documentation, you can try to make the same request there and see what kind of clean response you get for API v2
19.10.2021, 14:49
Original comment available on version: ru

I don’t understand how you practice
ask
[{"name":"Oksana","findbyArray":["phone"],"showerrorafterfind":false,"phones":["0962153402"]}]
retrievable input {"status":1,"dataArray":["70"]}
third client
[{"name":"Tanya","findbyArray":["phone"],"showerrorafterfind":false,"phones":["0662049162"]}]
and pardon, attached the screen with Try it out. Offending a client in onebox (previously imported via excel)
20.10.2021, 14:48
Original comment available on version: ru

If I see a contact, then it’s always the same pardon, like in a reminder.
If so, I’ll manually write the id from onebox into my database and transfer it to the request, then everything is ok
[{"userid":"56","name":"Tanya","findbyArray":["phone"],"showerrorafterfind":false,"phones":["0662049162"]}]
and after that I can edit without id from onebox - also normal
[{"name":"Tanya","findbyArray":["phone"],"showerrorafterfind":false,"phones":["0662049162"]}]
20.10.2021, 14:58
Original comment available on version: ru

A similar pardon, if I transfer the contact's phone number, which is not available in the onebox system
20.10.2021, 15:03
Original comment available on version: ru

Corrected. Shouldn't be fatal now
20.10.2021, 15:18
Original comment available on version: ru

Dyakuyu, clients work.
Once upon a time, a prayer of forgiveness and vilіna comes a pardon
"Error updating account item #0. Executing error: Unknown column 'externalid' in 'field list' in query:"
part of the bill, the devaluation of the externalid is `discountsum`='0', `externalid`='2947', `deliverynote`=
drop the whole request?
24.10.2021, 12:20
Original comment available on version: ru

Better create a new topic and put your request there. Because judging by a piece of your comment, this error concerns the process and not the contact, as in this topic
24.10.2021, 15:23
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