2024-10-15 10:50:56 +03:00
|
|
|
---
|
2024-09-08 15:26:00 +03:00
|
|
|
sidebar_position: 1
|
|
|
|
---
|
|
|
|
|
2024-10-15 10:50:56 +03:00
|
|
|
import Tabs from '@theme/Tabs';
|
|
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
|
2024-09-08 15:26:00 +03:00
|
|
|
# Bind barcodes
|
|
|
|
Binds barcodes to products
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`Function BindBarcodes(Val ClientID, Val APIKey, Val BarcodesMap) Export`
|
|
|
|
|
2024-10-15 15:15:47 +03:00
|
|
|
| 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 |
|
2024-09-08 15:26:00 +03:00
|
|
|
|
|
|
|
|
2024-10-09 09:42:00 +03:00
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Ozon Seller API
|
2024-09-08 15:26:00 +03:00
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
:::tip
|
2024-11-21 13:27:18 +03:00
|
|
|
Method at API documentation: [post /v1/barcode/add](https://docs.ozon.ru/api/seller/#operation/add-barcode)
|
2024-09-08 15:26:00 +03:00
|
|
|
:::
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
2024-12-16 19:38:57 +03:00
|
|
|
|
2024-10-15 21:15:56 +03:00
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
2024-12-20 16:27:30 +03:00
|
|
|
ClientID = "2479669";
|
|
|
|
APIKey = "09f65e9f-262d-4aca...";
|
2024-09-08 15:26:00 +03:00
|
|
|
|
|
|
|
BarcodesMap = New Map;
|
|
|
|
BarcodesMap.Insert(1626044001, "112233");
|
|
|
|
|
|
|
|
Result = OPI_Ozon.BindBarcodes(ClientID, APIKey, BarcodesMap);
|
|
|
|
```
|
2024-10-15 09:53:37 +03:00
|
|
|
|
2024-09-08 15:26:00 +03:00
|
|
|
|
2024-10-20 22:36:03 +03:00
|
|
|
<Tabs>
|
|
|
|
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
|
|
```bash
|
2024-10-22 08:59:24 +03:00
|
|
|
# JSON data can also be passed as a path to a .json file
|
|
|
|
|
2024-10-20 22:36:03 +03:00
|
|
|
oint ozon BindBarcodes \
|
2024-10-22 08:59:24 +03:00
|
|
|
--clientid "***" \
|
|
|
|
--apikey "***" \
|
|
|
|
--barcodes "{'1626044001':'112233'}"
|
2024-10-20 22:36:03 +03:00
|
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
|
|
```batch
|
2024-10-22 08:59:24 +03:00
|
|
|
:: JSON data can also be passed as a path to a .json file
|
|
|
|
|
2024-10-20 22:36:03 +03:00
|
|
|
oint ozon BindBarcodes ^
|
2024-10-22 08:59:24 +03:00
|
|
|
--clientid "***" ^
|
|
|
|
--apikey "***" ^
|
|
|
|
--barcodes "{'1626044001':'112233'}"
|
2024-10-20 22:36:03 +03:00
|
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
</Tabs>
|
2024-09-08 15:26:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-09-10 13:48:11 +03:00
|
|
|
{
|
|
|
|
"errors": [
|
|
|
|
{
|
|
|
|
"barcode": "112233",
|
|
|
|
"code": "item_not_found",
|
|
|
|
"error": "sellerID of item 1626044001 is not 2128753",
|
|
|
|
"sku": 1626044001
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2024-09-08 15:26:00 +03:00
|
|
|
```
|