mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-05-29 23:17:45 +02:00
82 lines
1.8 KiB
Plaintext
Vendored
82 lines
1.8 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 1
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Bind barcodes
|
|
Binds barcodes to products
|
|
|
|
|
|
|
|
`Function BindBarcodes(Val ClientID, Val APIKey, Val BarcodesMap) Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| ClientID | --clientid | String | ✔ | Client identifier |
|
|
| APIKey | --apikey | String | ✔ | API key |
|
|
| BarcodesMap | --barcodes | Map Of KeyAndValue | ✔ | Key > product SKU, Value > barcode |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Ozon Seller API
|
|
|
|
<br/>
|
|
|
|
:::tip
|
|
Method at API documentation: [post /v1/barcode/add](https://docs.ozon.ru/api/seller/#operation/add-barcode)
|
|
:::
|
|
<br/>
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
ClientID = "2479669";
|
|
APIKey = "09f65e9f-262d-4aca...";
|
|
|
|
BarcodesMap = New Map;
|
|
BarcodesMap.Insert(1626044001, "112233");
|
|
|
|
Result = OPI_Ozon.BindBarcodes(ClientID, APIKey, BarcodesMap);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
# JSON data can also be passed as a path to a .json file
|
|
|
|
oint ozon BindBarcodes \
|
|
--clientid "***" \
|
|
--apikey "***" \
|
|
--barcodes "{'1626044001':'112233'}"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
:: JSON data can also be passed as a path to a .json file
|
|
|
|
oint ozon BindBarcodes ^
|
|
--clientid "***" ^
|
|
--apikey "***" ^
|
|
--barcodes "{'1626044001':'112233'}"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"errors": [
|
|
{
|
|
"barcode": "112233",
|
|
"code": "item_not_found",
|
|
"error": "sellerID of item 1626044001 is not 2128753",
|
|
"sku": 1626044001
|
|
}
|
|
]
|
|
}
|
|
```
|