1b.app
Link copied -

/api/v2/order/set/ Don't know Product for externalid

/api/v2/order/set/ Don't know Product for externalid
Such a name Id is exactly є, і він is correct, judging from the Products from the OneBox itself.
Without the "products" array, the process works fine.
Here is one of two:
1) I'm not correctly passing the array. Having reverified six times, I do not pardon. Prohannya perevіrit your eye.
2) Tse pardon from the OneBox API.
I send a screenshot from Tools to Chrome, an array, which I transfer from order / set and Log from the server
[2022-07-08 13:50:18]
host: inox-trade.1b.app
url: /api/v2/order/set/
contentID: api-v2-order-set
point: /shop.starter.php
engine_sessionid: 1657277418_1065
data: Array(
[0] => Array(
[workflow] => 2
[statusid] => 18
[name] => Quick order: Sergey2
[content] =>
Customer: Sergiy2
Phone: 0504131799
Comment: Test!
Product: Stand for combi oven PP-1
Product link: https://inox-trade.com.ua/podstavka-pod-konvektomat-pp-1.html
Price: 6200.00 UAH
[client] => Array(
[used] => 604
)
Original question is available on version: ru

Answers:

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
Parameters for product search must be passed in a separate array
08.07.2022, 17:43
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
I'm sorry, I didn't notice right away, you have filled
08.07.2022, 17:43
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
Try adding the showerrorafterfind parameter - it will show you if the product was found, or if there was an error
08.07.2022, 17:44
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
And what response are you currently getting when you send such a request?
08.07.2022, 17:47
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
According to the documentation, findbyArray's parameters are the parameters of that product.
"id": "id",
"externalid": "externalid",
"article": "article",
"findbyArray": [
"external",
"article"
],
In your case, the array is closed somehow right after the externalid parameter
[productinfo] => Array (
[externalid] => 9454
)
08.07.2022, 17:51
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
That is, the array in your case for 1 product should be something like this:
productinfo: {
"externalid": "9454",
"findbyArray": [
"external",
],
"showerrorafterfind": true, //This is to see the response
},
08.07.2022, 17:54
Original comment available on version: ru

Dyakuyu) Razіbravsya.
The array "findbyArray" maw belongs to the "productinfo" object. And I knew more wine.
"products" => [ (object) [
"productinfo" => (object) [
"externalid" => $product_id,
"findbyArray" => [
"external"
],
]
]],
Ale, now turn the pardon:
"Error updating account item #0. Can't search by externalid field. External ID field uniqueness setting is disabled in OneBox settings (code1c)".
What is sim work?
08.07.2022, 22:49
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license

Rallo Sergiy Oleksandrovych
Missing wrote:
What is sim work?

The reason is indicated in the miltsi "In the OneBox settings, the setting Uniqueness of the External ID field (code1c) is disabled"
You need to add the uniqueness of the Call ID field here
If you have duplicated values in this field for certain products, then with offensive savings you will see a pardon. Otherwise, if it is so necessary for you, then you cannot work on updating products in this field.
10.07.2022, 16:58
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