1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-10-30 23:47:46 +02:00

Фикс формирования доков

This commit is contained in:
Anton Titovets
2025-01-07 11:54:06 +03:00
parent 290f931c88
commit 8614bd5522
26 changed files with 153 additions and 1831 deletions

View File

@@ -0,0 +1,81 @@
---
sidebar_position: 4
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Create FBO draft
Creates a draft of FBO supply order
`Function CreateFBODraft(Val ClientID, Val APIKey, Val Clusters, Val Items, Val SupplyType = "CREATE_TYPE_DIRECT", Val ShippingPoint = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| ClientID | --clientid | String | ✔ | Client identifier |
| APIKey | --apikey | String | ✔ | API key |
| Clusters | --clusters | String, Array of String | ✔ | Clusters identifiers |
| Items | --items | Map Of KeyAndValue | ✔ | Items list: Key > SKU, Value > Amount |
| SupplyType | --type | String | ✖ | Supply type: CREATE_TYPE_CROSSDOCK, CREATE_TYPE_DIRECT |
| ShippingPoint | --point | String | ✖ | Shipping point identifier for CREATE_TYPE_CROSSDOCK |
Returns: Map Of KeyAndValue - serialized JSON response from Ozon Seller API
<br/>
:::tip
Method at API documentation: [post /v1/draft/create](https://docs.ozon.ru/api/seller/#operation/SupplyDraftAPI_DraftCreate)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
ClientID = "2479669";
APIKey = "09f65e9f-262d-4aca...";
Cluster = 1;
Items = New Map;
Items.Insert("1783161863", 5);
Items.Insert("1784654052", 2);
Result = OPI_Ozon.CreateFBODraft(ClientID, APIKey, Cluster, Items);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
# JSON data can also be passed as a path to a .json file
oint ozon CreateFBODraft \
--clientid "***" \
--apikey "***" \
--clusters 1 \
--items "{'1783161863':5,'1784654052':2}"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
:: JSON data can also be passed as a path to a .json file
oint ozon CreateFBODraft ^
--clientid "***" ^
--apikey "***" ^
--clusters 1 ^
--items "{'1783161863':5,'1784654052':2}"
```
</TabItem>
</Tabs>
```json title="Result"
{
"operation_id": "0193f24f-1222-7663-868c-e5a99cc0a4ac"
}
```

View File

@@ -0,0 +1,213 @@
---
sidebar_position: 1
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get clusters list
Gets information about clusters and warehouses
`Function GetClustersList(Val ClientID, Val APIKey, Val ClusterType = "CLUSTER_TYPE_OZON") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| ClientID | --clientid | String | &#x2714; | Client identifier |
| APIKey | --apikey | String | &#x2714; | API key |
| ClusterType | --type | String | &#x2716; | Cluster type: CLUSTER_TYPE_OZON (Russia), CLUSTER_TYPE_CIS (CIS) |
Returns: Map Of KeyAndValue - serialized JSON response from Ozon Seller API
<br/>
:::tip
Method at API documentation: [post /v1/cluster/list](https://docs.ozon.ru/api/seller/#operation/SupplyDraftAPI_DraftClusterList)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
ClientID = "2479669";
APIKey = "09f65e9f-262d-4aca...";
Result = OPI_Ozon.GetClustersList(ClientID, APIKey);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint ozon GetClustersList \
--clientid "***" \
--apikey "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint ozon GetClustersList ^
--clientid "***" ^
--apikey "***"
```
</TabItem>
</Tabs>
```json title="Result"
{
"clusters": [
{
"logistic_clusters": [
{
"warehouses": [
{
"warehouse_id": 6048863967000,
"type": "FULL_FILLMENT",
"name": "Тверь_Хаб"
},
{
"warehouse_id": 23021125185000,
"type": "FULL_FILLMENT",
"name": "ТВЕРЬ_РФЦ"
},
{
"warehouse_id": 22089924655000,
"type": "EXPRESS_DARK_STORE",
"name": "FRESH_MAX_ТВЕРЬ_КАЛИНИНА"
},
{
"warehouse_id": 1020002080349000,
"type": "SORTING_CENTER",
"name": "ТВЕРЬ_КОНЯЕВСКАЯ_ФБС"
},
{
"warehouse_id": 23552438554000,
"type": "SORTING_CENTER",
"name": "ТВЕРЬ_ХАБ_БОРОВЛЁВО"
},
{
"warehouse_id": 1020000995840000,
"type": "SORTING_CENTER",
"name": "ТВЕРЬ_ХАБ_КОНЯЕВСКАЯ_2"
},
{
"warehouse_id": 1020000893884000,
"type": "SORTING_CENTER",
"name": "ТВЕРЬ_ХАБ_КОНЯЕВСКАЯ_1"
},
{
"warehouse_id": 23470817390000,
"type": "SORTING_CENTER",
"name": "ТВЕРЬ_ХАБ_КГТ"
},
{
"warehouse_id": 1020001556829000,
"type": "SORTING_CENTER",
"name": "ТВЕРЬ_ХАБ_КОНЯЕВСКАЯ_2_КГТ"
},
{
"warehouse_id": 1020001001744000,
"type": "SORTING_CENTER",
"name": "СЦ_ТВЕРЬ_КОНЯЕВСКАЯ_2_Возвраты"
},
{
"warehouse_id": 1020001775656000,
"type": "SORTING_CENTER",
"name": "ТВЕРЬ_ТСЦ"
}
]
},
{
"warehouses": [
{
"warehouse_id": 1020001878356000,
"type": "SORTING_CENTER",
"name": "СЫКТЫВКАР_ХАБ_ОКТЯБРЬСКИЙ"
},
{
"warehouse_id": 1020001878456000,
"type": "SORTING_CENTER",
"name": "СЫКТЫВКАР_ХАБ_ЛЕСОПАРКОВАЯ"
},
{
"warehouse_id": 1020001887245000,
"type": "SORTING_CENTER",
"name": "СЦ_СЫКТЫВКАР_ХАБ_ЛЕСОПАРКОВАЯ_Возвраты"
},
{
"warehouse_id": 1020001887250000,
"type": "SORTING_CENTER",
"name": "СЦ_СЫКТЫВКАР_ХАБ_ОКТЯБРЬСКИЙ_Возвраты"
},
{
"warehouse_id": 1020001345518000,
"type": "SORTING_CENTER",
"name": "СЦ_СЫКТЫВКАР_ЛЕСОПАРКОВАЯ_3PL_Возвраты"
},
{
"warehouse_id": 1020002341771000,
"type": "SORTING_CENTER",
"name": "СЫКТЫВКАР_ХАБ_ОКТЯБРЬСКИЙ_КГТ"
},
{
"warehouse_id": 23840122253000,
"type": "SORTING_CENTER",
"name": "СЫКТЫВКАР_ХАБ_ЛЕСОПАРКОВАЯ_3PL"
},
{
"warehouse_id": 1020001021069000,
"type": "SORTING_CENTER",
"name": "СЫКТЫВКАР_ХАБ_ОКТЯБРЬСКИЙ_131_3PL "
},
{
"warehouse_id": 1020001345521000,
"type": "SORTING_CENTER",
"name": "СЦ_СЫКТЫВКАР_ОКТЯБРЬСКИЙ_131_3PL _Возвраты"
}
]
},
{
"warehouses": [
{
"warehouse_id": 1020001370734000,
"type": "SORTING_CENTER",
"name": "АРХАНГЕЛЬСК_ХАБ_НАХИМОВА"
},
{
"warehouse_id": 1020001371887000,
"type": "SORTING_CENTER",
"name": "СЦ_АРХАНГЕЛЬСК_ХАБ_НАХИМОВА_Возвраты"
},
{
"warehouse_id": 1020001371884000,
"type": "SORTING_CENTER",
"name": "АРХАНГЕЛЬСК_ХАБ_КГТ"
},
{
"warehouse_id": 20547967270000,
"type": "SORTING_CENTER",
"name": "КОТЛАС_ХАБ_КУЗНЕЦОВА_3PL"
},
{
"warehouse_id": 1020001345511000,
"type": "SORTING_CENTER",
"name": "СЦ_КОТЛАС_КУЗНЕЦОВА_3PL_Возвраты"
}
]
},
{
"warehouses": [
{
"warehouse_id": 1020000809707000,
"type": "SORTING_CENTER",
"name": "СЦ_ВЛАДИМИР_МЕЩЁРСКАЯ_Возвраты"
},
{
"warehouse_id": 1020000930201000,
...
```

View File

@@ -1,225 +0,0 @@
---
sidebar_position: 5
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get FBO draft
Gets FBO draft by ID
`Function GetFBODraft(Val ClientID, Val APIKey, Val OperationID) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| ClientID | --clientid | String | &#x2714; | Client identifier |
| APIKey | --apikey | String | &#x2714; | API key |
| OperationID | --oper | String | &#x2714; | Draft (operation) ID) |
Returns: Map Of KeyAndValue - serialized JSON response from Ozon Seller API
<br/>
:::tip
Method at API documentation: [post /v1/draft/create/info](https://docs.ozon.ru/api/seller/#operation/SupplyDraftAPI_DraftCreateInfo)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
ClientID = "2479669";
APIKey = "09f65e9f-262d-4aca...";
OperationID = "0193f9aa-d617-760b-8be6-ea9b87581390";
Status = "CALCULATION_STATUS_IN_PROGRESS";
While Status = "CALCULATION_STATUS_IN_PROGRESS" Do
Result = OPI_Ozon.GetFBODraft(ClientID, APIKey, OperationID);
Status = Result["status"];
OPI_Tools.Pause(20);
EndDo;
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint ozon GetFBODraft \
--clientid "***" \
--apikey "***" \
--oper "0193fce0-b0a3-71ab-8cb6-864a77ae3d46"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint ozon GetFBODraft ^
--clientid "***" ^
--apikey "***" ^
--oper "0193fce0-b0a3-71ab-8cb6-864a77ae3d46"
```
</TabItem>
</Tabs>
```json title="Result"
{
"status": "CALCULATION_STATUS_SUCCESS",
"clusters": [
{
"warehouses": [
{
"bundle_ids": [
{
"bundle_id": "0193f24f-18bb-7122-ba3d-39beb6255b48",
"is_docless": true
}
],
"supply_warehouse": {
"warehouse_id": 1020000759116000,
"name": "НОГИНСК_РФЦ",
"address": "142440, Российская Федерация, Московская область, Богородский городской округ, рабочий поселок Обухово, территория Обухово-Парк, дом 2, строение 1"
},
"status": {
"state": "WAREHOUSE_SCORING_STATUS_FULL_AVAILABLE",
"invalid_reason": "WAREHOUSE_SCORING_INVALID_REASON_NO_REASON",
"is_available": true
},
"restricted_bundle_id": "",
"travel_time_days": "0",
"total_score": 0.851557199210075,
"total_rank": 1
},
{
"bundle_ids": [
{
"bundle_id": "0193f24f-18b9-744c-9de3-65ac12e2613c",
"is_docless": true
}
],
"supply_warehouse": {
"warehouse_id": 1020000115166000,
"name": "ЖУКОВСКИЙ_РФЦ",
"address": "140182 Россия, Московская обл., г.о. Жуковский, г.Жуковский, р-н Замоскворечье, д.457, стр.5"
},
"status": {
"state": "WAREHOUSE_SCORING_STATUS_FULL_AVAILABLE",
"invalid_reason": "WAREHOUSE_SCORING_INVALID_REASON_NO_REASON",
"is_available": true
},
"restricted_bundle_id": "",
"travel_time_days": "0",
"total_score": 0.850026908233256,
"total_rank": 2
},
{
"bundle_ids": [
{
"bundle_id": "0193f24f-18ba-7543-b8f8-866d5f6ed4f4",
"is_docless": true
}
],
"supply_warehouse": {
"warehouse_id": 23902289166000,
"name": "ПУШКИНО_2_РФЦ",
"address": "Россия, Московская область, г.о. Пушкинский, г. Пушкино, шоссе Ярославское, д.218"
},
"status": {
"state": "WAREHOUSE_SCORING_STATUS_FULL_AVAILABLE",
"invalid_reason": "WAREHOUSE_SCORING_INVALID_REASON_NO_REASON",
"is_available": true
},
"restricted_bundle_id": "",
"travel_time_days": "0",
"total_score": 0.831432427336262,
"total_rank": 3
},
{
"bundle_ids": [
{
"bundle_id": "0193f24f-18bb-7121-b57d-e2ca4cce0cc8",
"is_docless": true
}
],
"supply_warehouse": {
"warehouse_id": 23021125185000,
"name": "ТВЕРЬ_РФЦ",
"address": "170540, Тверская область, Калининский р-н, промышленная зона Боровлёво-2, комплекс 1А"
},
"status": {
"state": "WAREHOUSE_SCORING_STATUS_FULL_AVAILABLE",
"invalid_reason": "WAREHOUSE_SCORING_INVALID_REASON_NO_REASON",
"is_available": true
},
"restricted_bundle_id": "",
"travel_time_days": "0",
"total_score": 0.828742640442574,
"total_rank": 4
},
{
"bundle_ids": [
{
"bundle_id": "0193f24f-18ba-744c-b3fa-80a8a5624222",
"is_docless": true
}
],
"supply_warehouse": {
"warehouse_id": 23843917228000,
"name": "ПУШКИНО_1_РФЦ",
"address": "Россия, Московская ОБЛ, Пушкинский Г.О., Пушкино Г., Ярославское Ш., дом 216."
},
"status": {
"state": "WAREHOUSE_SCORING_STATUS_FULL_AVAILABLE",
"invalid_reason": "WAREHOUSE_SCORING_INVALID_REASON_NO_REASON",
"is_available": true
},
"restricted_bundle_id": "",
"travel_time_days": "0",
"total_score": 0.8256261036488,
"total_rank": 5
},
{
"bundle_ids": [
{
"bundle_id": "0193f24f-18b9-744b-b287-86a1ee2966a2",
"is_docless": true
}
],
"supply_warehouse": {
"warehouse_id": 1020002006967000,
"name": "ЯРОСЛАВЛЬ_РФЦ",
"address": "150521, Россия, Ярославская обл., Ярославский р-н, д.Корюково, ул.Торговая, зд.3"
},
"status": {
"state": "WAREHOUSE_SCORING_STATUS_PARTIAL_AVAILABLE",
"invalid_reason": "WAREHOUSE_SCORING_INVALID_REASON_PARTIAL_MATRIX_AVAILABLE",
"is_available": true
},
"restricted_bundle_id": "0193f24f-1880-7379-a955-ef86d55958f2",
"travel_time_days": "0",
"total_score": 0.35282004108927,
"total_rank": 6
},
{
"bundle_ids": [],
"supply_warehouse": {
"warehouse_id": 1020001642383000,
"name": "НОГИНСК_РФЦ_НЕГАБАРИТ",
"address": "142440, Российская Федерация, Московская область, Богородский городской округ, рабочий поселок Обухово, территория Обухово-Парк, дом 2, строение 1"
},
"status": {
"state": "WAREHOUSE_SCORING_STATUS_NOT_AVAILABLE",
"invalid_reason": "WAREHOUSE_SCORING_INVALID_REASON_NOT_AVAILABLE_MATRIX",
"is_available": false
},
"restricted_bundle_id": "0193f24f-1880-737a-98ff-dcb958a92259",
...
```

View File

@@ -1,84 +0,0 @@
---
sidebar_position: 3
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get FBO shipments list
Gets a list of active shipments with or without filtering
`Function GetFBOShipmentsList(Val ClientID, Val APIKey, Val Filter = Undefined, Val AddFields = Undefined, Val Indent = 0, Val Traslit = False) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| ClientID | --clientid | String | &#x2714; | Client identifier |
| APIKey | --apikey | String | &#x2714; | API key |
| Filter | --filter | Structure Of KeyAndValue | &#x2716; | Shipments filter. See GetShipmentsFilterStructure |
| AddFields | --with | Structure Of KeyAndValue | &#x2716; | Include additional fields in the response. See GetShipmentAdditionalFields |
| Indent | --offset | Number | &#x2716; | Offset of the result items |
| Traslit | --trlt | Boolean | &#x2716; | If Cyrillic to Latin address transliteration is enabled > True |
Returns: Map Of KeyAndValue - serialized JSON response from Ozon Seller API
<br/>
:::tip
Method at API documentation: [post /v2/posting/fbo/list](https://docs.ozon.ru/api/seller/#operation/PostingAPI_GetFboPostingList)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
ClientID = "2479669";
APIKey = "09f65e9f-262d-4aca...";
AddFields = New Structure;
AddFields.Insert("analytics_data", True);
AddFields.Insert("financial_data", True);
Filter = New Structure;
Filter.Insert("since", XMLString('20230101') + "Z");
Filter.Insert("to" , XMLString('20240101') + "Z");
Result = OPI_Ozon.GetFBOShipmentsList(ClientID, APIKey, Filter, AddFields);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
# JSON data can also be passed as a path to a .json file
oint ozon GetFBOShipmentsList \
--clientid "***" \
--apikey "***" \
--filter "{'since':'2023-01-01T00:00:00Z','to':'2024-01-01T00:00:00Z'}" \
--with "{'analytics_data':true,'financial_data':true}"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
:: JSON data can also be passed as a path to a .json file
oint ozon GetFBOShipmentsList ^
--clientid "***" ^
--apikey "***" ^
--filter "{'since':'2023-01-01T00:00:00Z','to':'2024-01-01T00:00:00Z'}" ^
--with "{'analytics_data':true,'financial_data':true}"
```
</TabItem>
</Tabs>
```json title="Result"
{
"result": []
}
```

View File

@@ -1,132 +0,0 @@
---
sidebar_position: 6
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get FBO timeslots
Get available timeslots at the final supply warehouses
`Function GetFBOTimeslots(Val ClientID, Val APIKey, Val DateFrom, Val DateTo, Val Draft, Val Warehouses) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| ClientID | --clientid | String | &#x2714; | Client identifier |
| APIKey | --apikey | String | &#x2714; | API key |
| DateFrom | --from | Date | &#x2714; | Start date of the required period of available timeslots |
| DateTo | --to | Date | &#x2714; | The end date of the desired period of available timeslots (28 days from current max.) |
| Draft | --draft | Number, String | &#x2714; | Supply draft identifier |
| Warehouses | --whs | Array Of Number | &#x2714; | Warehouse or multiple warehouses to receive timeslots |
Returns: Map Of KeyAndValue - serialized JSON response from Ozon Seller API
<br/>
:::tip
Method at API documentation: [post /v1/draft/timeslot/info](https://docs.ozon.ru/api/seller/#operation/SupplyDraftAPI_DraftTimeslotInfo)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
ClientID = "2479669";
APIKey = "09f65e9f-262d-4aca...";
Day = 86400;
DateFrom = OPI_Tools.GetCurrentDate();
DateTo = DateFrom + Day;
Draft = "39562552";
Warehouse = "1020000115166000";
Result = OPI_Ozon.GetFBOTimeslots(ClientID, APIKey, DateFrom, DateTo, Draft, Warehouse);
```
```json title="Result"
{
"drop_off_warehouse_timeslots": [
{
"drop_off_warehouse_id": 1020000115166000,
"warehouse_timezone": "Europe/Moscow",
"current_time_in_timezone": "2024-12-24T21:33:33.457363400Z",
"days": [
{
"timeslots": [
{
"from_in_timezone": "2024-12-24T23:00:00Z",
"to_in_timezone": "2024-12-25T00:00:00Z"
}
],
"date_in_timezone": "2024-12-24T00:00:00Z"
},
{
"timeslots": [
{
"from_in_timezone": "2024-12-25T02:00:00Z",
"to_in_timezone": "2024-12-25T03:00:00Z"
},
{
"from_in_timezone": "2024-12-25T03:00:00Z",
"to_in_timezone": "2024-12-25T04:00:00Z"
},
{
"from_in_timezone": "2024-12-25T04:00:00Z",
"to_in_timezone": "2024-12-25T05:00:00Z"
},
{
"from_in_timezone": "2024-12-25T05:00:00Z",
"to_in_timezone": "2024-12-25T06:00:00Z"
},
{
"from_in_timezone": "2024-12-25T06:00:00Z",
"to_in_timezone": "2024-12-25T07:00:00Z"
},
{
"from_in_timezone": "2024-12-25T08:00:00Z",
"to_in_timezone": "2024-12-25T09:00:00Z"
},
{
"from_in_timezone": "2024-12-25T09:00:00Z",
"to_in_timezone": "2024-12-25T10:00:00Z"
},
{
"from_in_timezone": "2024-12-25T10:00:00Z",
"to_in_timezone": "2024-12-25T11:00:00Z"
},
{
"from_in_timezone": "2024-12-25T12:00:00Z",
"to_in_timezone": "2024-12-25T13:00:00Z"
},
{
"from_in_timezone": "2024-12-25T17:00:00Z",
"to_in_timezone": "2024-12-25T18:00:00Z"
},
{
"from_in_timezone": "2024-12-25T20:00:00Z",
"to_in_timezone": "2024-12-25T21:00:00Z"
},
{
"from_in_timezone": "2024-12-25T21:00:00Z",
"to_in_timezone": "2024-12-25T22:00:00Z"
},
{
"from_in_timezone": "2024-12-25T22:00:00Z",
"to_in_timezone": "2024-12-25T23:00:00Z"
}
],
"date_in_timezone": "2024-12-25T00:00:00Z"
}
]
}
],
"requested_date_from": "2024-12-24T00:00:00Z",
"requested_date_to": "2024-12-25T21:33:33.412737700Z"
}
```

View File

@@ -1,55 +0,0 @@
---
sidebar_position: 7
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get shipment additional fields
Returns the structure of inclusion of additional response fields for the GetFBOShipmentsList method
`Function GetShipmentAdditionalFields(Val Clear = False) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Clear | --empty | Boolean | &#x2716; | True > structure with empty valuse, False > field descriptions at values |
Returns: Structure Of KeyAndValue - Fields structure
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Result = OPI_Ozon.GetShipmentAdditionalFields();
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint ozon GetShipmentAdditionalFields \
--empty false
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint ozon GetShipmentAdditionalFields ^
--empty false
```
</TabItem>
</Tabs>
```json title="Result"
{
"analytics_data": "<pass True to add analytics data to the response>",
"financial_data": "<pass True to add financial data to the response>"
}
```

View File

@@ -1,56 +0,0 @@
---
sidebar_position: 8
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get shipments filter structure
Returns the filter structure for the GetFBOShipmentsList method
`Function GetShipmentsFilterStructure(Val Clear = False) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Clear | --empty | Boolean | &#x2716; | True > structure with empty valuse, False > field descriptions at values |
Returns: Structure Of KeyAndValue - Filter structure
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Result = OPI_Ozon.GetShipmentsFilterStructure();
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint ozon GetShipmentsFilterStructure \
--empty false
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint ozon GetShipmentsFilterStructure ^
--empty false
```
</TabItem>
</Tabs>
```json title="Result"
{
"since": "Period start in ISO format",
"status": "Shipment status",
"to": "Period end in ISO format"
}
```

View File

@@ -1,69 +0,0 @@
---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get shipping warehouses list
Gets a list of warehouses, sorting centers and delivery points
`Function GetShippingWarehousesList(Val ClientID, Val APIKey, Val Search, Val SupplyType = "CREATE_TYPE_DIRECT") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| ClientID | --clientid | String | &#x2714; | Client identifier |
| APIKey | --apikey | String | &#x2714; | API key |
| Search | --search | String | &#x2714; | Search by name (4 chars. min). For delivery points enter the full name |
| SupplyType | --type | String, Array of String | &#x2716; | Supply types: CREATE_TYPE_CROSSDOCK, CREATE_TYPE_DIRECT |
Returns: Map Of KeyAndValue - serialized JSON response from Ozon Seller API
<br/>
:::tip
Method at API documentation: [post /v1/warehouse/fbo/list](https://docs.ozon.ru/api/seller/#operation/SupplyDraftAPI_DraftGetWarehouseFboList)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
ClientID = "2479669";
APIKey = "09f65e9f-262d-4aca...";
Search = "Tver";
Result = OPI_Ozon.GetShippingWarehousesList(ClientID, APIKey, Search);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint ozon GetShippingWarehousesList \
--clientid "***" \
--apikey "***" \
--search "Tver"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint ozon GetShippingWarehousesList ^
--clientid "***" ^
--apikey "***" ^
--search "Tver"
```
</TabItem>
</Tabs>
```json title="Result"
{
"search": []
}
```

View File

@@ -1,4 +0,0 @@
{
"label": "Fbo scheme",
"position": "8"
}

View File

@@ -1,71 +0,0 @@
---
sidebar_position: 3
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Add rows
Adds new rows to the table
`Function AddRecords(Val Table, Val DataArray, Val Transaction = True, Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Table | --table | String | &#x2714; | Table name |
| DataArray | --rows | Array of Structure | &#x2714; | An array of string data structures: Key > field, Value > field value |
| Transaction | --trn | Boolean | &#x2716; | True > adding records to transactions with rollback on error |
| Connection | --db | String, Arbitrary | &#x2716; | Existing connection or database path |
Returns: Structure Of KeyAndValue, String - Result of query execution
<br/>
:::tip
Binary data can also be transferred as a structure `{'blob':File path}`
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Image = "https://api.athenaeum.digital/test_data/picture.jpg";
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
PictureFile = GetTempFileName("png");
Image.Write(PictureFile); // PictureFile - File to disk
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_BC85_14.sqlite";
Table = "test";
DataArray = New Array;
RowStructure2 = New Structure;
RowStructure2.Insert("name" , "Vitaly"); // TEXT
RowStructure2.Insert("age" , 25); // INTEGER
RowStructure2.Insert("salary" , 1000.12); // REAL
RowStructure2.Insert("is_active" , True); // BOOL
RowStructure2.Insert("created_at", OPI_Tools.GetCurrentDate()); // DATETIME
RowStructure2.Insert("data" , Image); // BLOB
RowStrucutre1 = New Structure;
RowStrucutre1.Insert("name" , "Lesha") ; // TEXT
RowStrucutre1.Insert("age" , 20); // INTEGER
RowStrucutre1.Insert("salary" , 200.20) ; // REAL
RowStrucutre1.Insert("is_active" , False) ; // BOOL
RowStrucutre1.Insert("created_at", OPI_Tools.GetCurrentDate()); // DATETIME
RowStrucutre1.Insert("data" , New Structure("blob", PictureFile)); // BLOB
DataArray.Add(RowStructure2);
DataArray.Add(RowStrucutre1);
Result = OPI_SQLite.AddRecords(Table, DataArray, , Base);
```

View File

@@ -1,48 +0,0 @@
---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Create table
Creates an empty table in the database
`Function CreateTable(Val Table, Val ColoumnsStruct, Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Table | --table | String | &#x2714; | Table name |
| ColoumnsStruct | --cols | Structure Of KeyAndValue | &#x2714; | Column structure: Key > Name, Value > Data type |
| Connection | --db | String, Arbitrary | &#x2716; | Existing connection or database path |
Returns: Structure Of KeyAndValue, String - The result of the execution or SQL query text
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_BC85_14.sqlite";
Table = "test";
ColoumnsStruct = New Structure;
ColoumnsStruct.Insert("id" , "INTEGER PRIMARY KEY");
ColoumnsStruct.Insert("name" , "TEXT");
ColoumnsStruct.Insert("age" , "INTEGER");
ColoumnsStruct.Insert("salary" , "REAL");
ColoumnsStruct.Insert("is_active" , "BOOLEAN");
ColoumnsStruct.Insert("created_at", "DATETIME");
ColoumnsStruct.Insert("data" , "BLOB");
Result = OPI_SQLite.CreateTable(Table, ColoumnsStruct, Base);
```

View File

@@ -1,51 +0,0 @@
---
sidebar_position: 6
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Delete records
Deletes records from the table
`Function DeletePosts(Val Table, Val Filters = "", Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Table | --table | String | &#x2714; | Table name |
| Filters | --filter | Array of Structure | &#x2716; | Filters array. See GetRecordsFilterStrucutre |
| Connection | --db | String, Arbitrary | &#x2716; | Existing connection or database path |
Returns: Structure Of KeyAndValue, String - Result of query execution
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_BC85_14.sqlite";
Table = "test";
Filters = New Array;
FilterStructure = New Structure;
FilterStructure.Insert("field", "name");
FilterStructure.Insert("type" , "=");
FilterStructure.Insert("value", "Vitaly A.");
FilterStructure.Insert("union", "AND");
FilterStructure.Insert("raw" , False);
Filters.Add(FilterStructure);
Result = OPI_SQLite.DeletePosts(Table, FilterStructure, Base);
```

View File

@@ -1,42 +0,0 @@
---
sidebar_position: 7
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get records filter strucutre
Gets the template structure for filtering records in ORM queries
`Function GetRecordsFilterStrucutre(Val Clear = False) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Clear | --empty | Boolean | &#x2716; | True > structure with empty valuse, False > field descriptions at values |
Returns: Structure Of KeyAndValue - Record filter element
<br/>
:::tip
The use of the `raw` feature is necessary for compound constructions like `BEETWEEN`. For example: with `raw:false` the filter `type:BETWEEN` `value:10 AND 20` will be interpolated as `BETWEEN ?1 `^^.
where `?1 = "10 AND 20,"' which would cause an error.
In such a case, you must use `raw:true` to set the condition directly in the query text
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
```

View File

@@ -1,73 +0,0 @@
---
sidebar_position: 4
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get records
Gets records from the selected table
`Function GetRecords(Val Table, Val Fields = "*", Val Filters = "", Val Sort = "", Val Count = "", Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Table | --table | String | &#x2714; | Table name |
| Fields | --fields | Array Of String | &#x2716; | Fields for selection |
| Filters | --filter | Array of Structure | &#x2716; | Filters array. See GetRecordsFilterStrucutre |
| Sort | --order | Structure Of KeyAndValue | &#x2716; | Sorting: Key > field name, Value > direction (ASC, DESC) |
| Count | --limit | Number | &#x2716; | Limiting the number of received strings |
| Connection | --db | String, Arbitrary | &#x2716; | Existing connection or database path |
Returns: Structure Of KeyAndValue, String - Result of query execution
<br/>
:::tip
Values of the Binary data type (BLOB) are returned as `{'blob':Base64 string}`
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_BC85_14.sqlite";
Table = "test";
Fields = New Array;
Fields.Add("name");
Fields.Add("salary");
Filters = New Array;
FilterStructure1 = New Structure;
FilterStructure1.Insert("field", "name");
FilterStructure1.Insert("type" , "=");
FilterStructure1.Insert("value", "Vitaly");
FilterStructure1.Insert("union", "AND");
FilterStructure1.Insert("raw" , False);
FilterStructure2 = New Structure;
FilterStructure2.Insert("field", "age");
FilterStructure2.Insert("type" , "BETWEEN");
FilterStructure2.Insert("value", "20 AND 30");
FilterStructure2.Insert("raw" , True);
Filters.Add(FilterStructure1);
Filters.Add(FilterStructure2);
Sort = New Structure("created_at", "DESC");
Count = 1;
Result = OPI_SQLite.GetRecords(Table, Fields, Filters, Sort, Count, Base);
```

View File

@@ -1,38 +0,0 @@
---
sidebar_position: 1
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get table information
Gets information about the table
`Function GetTableInformation(Val Table, Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Table | --table | String | &#x2714; | Table name |
| Connection | --db | String, Arbitrary | &#x2716; | Existing connection or database path |
Returns: Structure Of KeyAndValue, String - The result of the execution or SQL query text
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_BC85_14.sqlite";
Table = "test";
Result = OPI_SQLite.GetTableInformation(Table, Base);
```

View File

@@ -1,56 +0,0 @@
---
sidebar_position: 5
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Update records
Updates the value of records by selected criteria
`Function UpdateRecords(Val Table, Val ValueStructure, Val Filters = "", Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Table | --table | String | &#x2714; | Table name |
| ValueStructure | --values | Structure Of KeyAndValue | &#x2714; | Values structure: Key > field, Value > field value |
| Filters | --filter | Array of Structure | &#x2716; | Filters array. See GetRecordsFilterStrucutre |
| Connection | --db | String, Arbitrary | &#x2716; | Existing connection or database path |
Returns: Structure Of KeyAndValue, String - Result of query execution
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_BC85_14.sqlite";
Table = "test";
FieldsStructure = New Structure;
FieldsStructure.Insert("name" , "Vitaly A.");
FieldsStructure.Insert("salary", "999999");
Filters = New Array;
FilterStructure = New Structure;
FilterStructure.Insert("field", "name");
FilterStructure.Insert("type" , "=");
FilterStructure.Insert("value", "Vitaly");
FilterStructure.Insert("union", "AND");
FilterStructure.Insert("raw" , False);
Filters.Add(FilterStructure);
Result = OPI_SQLite.UpdateRecords(Table, FieldsStructure, FilterStructure, Base);
```

View File

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