1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-06-23 00:38:51 +02:00

OZON: Связанные SKU и штрихкоды

This commit is contained in:
Anton
2024-09-08 15:26:00 +03:00
parent 6c1c137a3f
commit 7772675b51
74 changed files with 4381 additions and 2877 deletions

View File

@ -0,0 +1 @@
oint ozon BindBarcodes --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --barcodes %barcodes%

View File

@ -0,0 +1 @@
oint ozon CreateBarcodes --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --productids %productids%

View File

@ -0,0 +1 @@
oint ozon GetRelatedSKUs --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --sku %sku%

View File

@ -0,0 +1,4 @@
{
"ClientID": "2128753",
"APIKey": "7cc90d26-33e4-499b..."
}

View File

@ -0,0 +1,5 @@
{
"ClientID": "2128753",
"APIKey": "7cc90d26-33e4-499b...",
"ProductID": 1111588191
}

View File

@ -0,0 +1,4 @@
{
"ClientID": "2128753",
"APIKey": "7cc90d26-33e4-499b..."
}

View File

@ -0,0 +1,7 @@
 ClientID = "2128753";
APIKey = "7cc90d26-33e4-499b...";
BarcodesMap = New Map;
BarcodesMap.Insert(1626044001, "112233");
Result = OPI_Ozon.BindBarcodes(ClientID, APIKey, BarcodesMap);

View File

@ -0,0 +1,5 @@
 ClientID = "2128753";
APIKey = "7cc90d26-33e4-499b...";
ProductID = "1111588191";
Result = OPI_Ozon.CreateBarcodes(ClientID, APIKey, ProductID);

View File

@ -0,0 +1,5 @@
 ClientID = "2128753";
APIKey = "7cc90d26-33e4-499b...";
SKU = 1626044001;
Result = OPI_Ozon.GetRelatedSKUs(ClientID, APIKey, SKU);

View File

@ -21,7 +21,9 @@ sidebar_position: 5
<br/>
:::tip
Method at API documentation: [disk.file.getExternalLink](https://dev.1c-bitrix.ru/rest_help/disk/file/disk_file_getexternallink.php)
The method has suddenly disappeared from the API on the cloud Bitrix24 where it was being tested (09/24). It might still work on other versions, but it's not guaranteed
Method at API documentation: [disk.file.getExternalLink](https://dev.1c-bitrix.ru/rest_help/disk/file/disk_file_getexternallink.php)
:::
<br/>

View File

@ -0,0 +1,49 @@
---
sidebar_position: 1
---
# Bind barcodes
Binds barcodes to products
`Function BindBarcodes(Val ClientID, Val APIKey, Val BarcodesMap) Export`
| Parameter | CLI option | Type | 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="Code example"
ClientID = "2128753";
APIKey = "7cc90d26-33e4-499b...";
BarcodesMap = New Map;
BarcodesMap.Insert(1626044001, "112233");
Result = OPI_Ozon.BindBarcodes(ClientID, APIKey, BarcodesMap);
```
```sh title="CLI command example"
oint ozon BindBarcodes --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --barcodes %barcodes%
```
```json title="Result"
```

View File

@ -0,0 +1,51 @@
---
sidebar_position: 2
---
# Create barcodes
Generates new barcodes for products
`Function CreateBarcodes(Val ClientID, Val APIKey, Val ProductsID) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| ClientID | --clientid | String | Client identifier |
| APIKey | --apikey | String | API key |
| ProductsID | --productids | String, Array of String | Products IDs for barcodes creating |
Returns: Map Of KeyAndValue - Serialized JSON response from Ozon Seller API
<br/>
:::tip
You can create barcodes for a maximum of 100 products per request
From one merchant account, you can use the method no more than 20 times per minute
Method at API documentation: [post /v1/barcode/generate](https://docs.ozon.ru/api/seller/#operation/generate-barcode)
:::
<br/>
```bsl title="Code example"
ClientID = "2128753";
APIKey = "7cc90d26-33e4-499b...";
ProductID = "1111588191";
Result = OPI_Ozon.CreateBarcodes(ClientID, APIKey, ProductID);
```
```sh title="CLI command example"
oint ozon CreateBarcodes --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --productids %productids%
```
```json title="Result"
```

View File

@ -0,0 +1,4 @@
{
"label": "Barcodes",
"position": "4"
}

View File

@ -1,5 +1,5 @@
---
sidebar_position: 24
sidebar_position: 25
---
# Add product video cover

View File

@ -1,5 +1,5 @@
---
sidebar_position: 23
sidebar_position: 24
---
# Add product video

View File

@ -45,5 +45,7 @@ You can pass up to 100 identifiers at a time
```
```json title="Result"
{
"result": true
}
```

View File

@ -1,5 +1,5 @@
---
sidebar_position: 25
sidebar_position: 26
---
# Complete the complex attribute

View File

@ -53,5 +53,13 @@ The product must be pre-archived (see ArchiveProducts)
```
```json title="Result"
{
"status": [
{
"offer_id": "143210608",
"is_deleted": true,
"error": ""
}
]
}
```

View File

@ -1,5 +1,5 @@
---
sidebar_position: 21
sidebar_position: 22
---
# Get attributes update structure

View File

@ -1,5 +1,5 @@
---
sidebar_position: 18
sidebar_position: 19
---
# Get codes upload status
@ -38,10 +38,14 @@ Method at API documentation: [post /v1/product/upload_digital_codes/info](https:
```sh title="CLI command example"
oint ozon GetCodesUploadStatus --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --taskid %taskid%
oint ozon GetCodesUploadStatus --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --taskid %taskid%
```
```json title="Result"
{
"code": 5,
"message": "Upload task not found",
"details": []
}
```

View File

@ -1,5 +1,5 @@
---
sidebar_position: 17
sidebar_position: 18
---
# Get product creation status

View File

@ -1,5 +1,5 @@
---
sidebar_position: 19
sidebar_position: 20
---
# Get product structure

View File

@ -38,10 +38,17 @@ Method at API documentation: [post /v1/product/info/subscription](https://docs.o
```sh title="CLI command example"
oint ozon GetProductSubscribersCount --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --sku %sku%
oint ozon GetProductSubscribersCount --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --sku %sku%
```
```json title="Result"
{
"result": [
{
"sku": 1626044001,
"count": 0
}
]
}
```

View File

@ -50,5 +50,139 @@ Method at API documentation: [post /v3/products/info/attributes](https://docs.oz
```
```json title="Result"
{
"result": [
{
"id": 1168052279,
"barcode": "",
"category_id": 0,
"name": "Protective film set for X3 NFC. Dark cotton",
"offer_id": "143210608",
"height": 250,
"depth": 10,
"width": 150,
"dimension_unit": "mm",
"weight": 100,
"weight_unit": "g",
"images": [
{
"file_name": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg",
"default": false,
"index": 1
},
{
"file_name": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture2.jpg",
"default": false,
"index": 2
}
],
"image_group_id": "",
"images360": [],
"pdf_list": [],
"attributes": [
{
"attribute_id": 85,
"complex_id": 0,
"values": [
{
"dictionary_value_id": 5060050,
"value": "Samsung"
}
]
},
{
"attribute_id": 10096,
"complex_id": 0,
"values": [
{
"dictionary_value_id": 61576,
"value": "red"
}
]
},
{
"attribute_id": 8229,
"complex_id": 0,
"values": [
{
"dictionary_value_id": 95911,
"value": "Protective film set for X3 NFC. Dark cotton"
}
]
},
{
"attribute_id": 9048,
"complex_id": 0,
"values": [
{
"dictionary_value_id": 0,
"value": "Protective film set for X3 NFC. Dark cotton"
}
]
},
{
"attribute_id": 4180,
"complex_id": 0,
"values": [
{
"dictionary_value_id": 0,
"value": "Protective film set for X3 NFC. Dark cotton"
}
]
},
{
"attribute_id": 9024,
"complex_id": 0,
"values": [
{
"dictionary_value_id": 0,
"value": "143210608"
}
]
},
{
"attribute_id": 20900,
"complex_id": 0,
"values": [
{
"dictionary_value_id": 0,
"value": "true"
}
]
}
],
"complex_attributes": [
{
"attributes": [
{
"attribute_id": 21837,
"complex_id": 100001,
"values": [
{
"dictionary_value_id": 0,
"value": "viedo1"
}
]
},
{
"attribute_id": 21841,
"complex_id": 100001,
"values": [
{
"dictionary_value_id": 0,
"value": "https://rutube.ru/video/c6cc4d620b1d4338901770a44b3e82f4/"
}
]
}
]
}
],
"color_image": "",
"last_id": "",
"description_category_id": 17028922
}
],
"total": 1,
"last_id": ""
}
```

View File

@ -1,5 +1,5 @@
---
sidebar_position: 22
sidebar_position: 23
---
# Get products filter structure

View File

@ -0,0 +1,51 @@
---
sidebar_position: 17
---
# Get related SKUs
Gets a single SKU from the old SKU FBS and SKU FBO identifiers
`Function GetRelatedSKUs(Val ClientID, Val APIKey, Val SKU) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| ClientID | --clientid | String | Client identifier |
| APIKey | --apikey | String | API key |
| SKU | --sku | Number, Array Of Number | Products identifiers in the Ozon system (SKU) |
Returns: Map Of KeyAndValue - Serialized JSON response from Ozon Seller API
<br/>
:::tip
The response will contain all SKUs associated with the passed SKUs. The method can process any SKU, even hidden or deleted.
Send up to 200 SKUs in a single request.
Method at API documentation: [post /v1/product/related-sku/get](https://docs.ozon.ru/api/seller/#operation/ProductAPI_ProductGetRelatedSKU)
:::
<br/>
```bsl title="Code example"
ClientID = "2128753";
APIKey = "7cc90d26-33e4-499b...";
SKU = 1626044001;
Result = OPI_Ozon.GetRelatedSKUs(ClientID, APIKey, SKU);
```
```sh title="CLI command example"
oint ozon GetRelatedSKUs --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --sku %sku%
```
```json title="Result"
```

View File

@ -1,5 +1,5 @@
---
sidebar_position: 20
sidebar_position: 21
---
# Get simplified product structure

View File

@ -45,5 +45,7 @@ You can restore from the archive no more than 10 products that were automaticall
```
```json title="Result"
{
"result": true
}
```

View File

@ -47,10 +47,14 @@ The activation code is linked to the digital product card
```sh title="CLI command example"
oint ozon UploadProductActivationCodes --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --productid "1111588191" --codes %codes%
oint ozon UploadProductActivationCodes --clientid "2128753" --apikey "7cc90d26-33e4-499b..." --productid "1111588191" --codes %codes%
```
```json title="Result"
{
"code": 7,
"message": "Is not service company",
"details": []
}
```