mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-04-11 11:41:56 +02:00
222 lines
5.8 KiB
Plaintext
222 lines
5.8 KiB
Plaintext
---
|
|
sidebar_position: 5
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Get office list
|
|
Gets a list of offices with or without a filter
|
|
|
|
|
|
|
|
`Function GetOfficeList(Val Token, Val Filter = "", Val TestAPI = False) Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| Token | --token | String | ✔ | Auth token |
|
|
| Filter | --filter | Structure of KeyAndValue | ✖ | Office filter. See GetOfficeFilterDescription |
|
|
| TestAPI | --testapi | Boolean | ✖ | Flag to use test API for requests |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from CDEK
|
|
|
|
<br/>
|
|
|
|
:::tip
|
|
Method at API documentation: [List of pickup points](https://api-docs.cdek.ru/36990336.html)
|
|
:::
|
|
<br/>
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3Mjk4NTk3NDksImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJjb250cmFjdDrQmNCcLdCg0KQt0JPQm9CTLTIyIiwiYWNjb3VudC1sYW5nOnJ1cyIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJhcGktdmVyc2lvbjoxLjEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJzb2xpZC1hZGRyZ...";
|
|
Filter = New Structure;
|
|
Filter.Insert("weight_max" , 50);
|
|
Filter.Insert("city_code" , 270);
|
|
Filter.Insert("allowed_cod", True);
|
|
|
|
Result = OPI_CDEK.GetOfficeList(Token, Filter, True);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
# JSON data can also be passed as a path to a .json file
|
|
|
|
oint cdek GetOfficeList \
|
|
--token "***" \
|
|
--filter "{'weight_max':50,'city_code':270,'allowed_cod':true}" \
|
|
--testapi "***"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
:: JSON data can also be passed as a path to a .json file
|
|
|
|
oint cdek GetOfficeList ^
|
|
--token "***" ^
|
|
--filter "{'weight_max':50,'city_code':270,'allowed_cod':true}" ^
|
|
--testapi "***"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
[
|
|
{
|
|
"code": "NSK1",
|
|
"name": "NSK1, Новосибирск, ул. Кривощековская",
|
|
"uuid": "b9ddb29e-2a11-406e-8d34-4763dff0cc86",
|
|
"work_time": "Пн-Пт 08:00-22:00, Сб-Вс 10:00-18:00",
|
|
"phones": [
|
|
{
|
|
"number": "+73832022250"
|
|
}
|
|
],
|
|
"email": "nsk@cdek.ru",
|
|
"type": "PVZ",
|
|
"owner_code": "CDEK",
|
|
"take_only": false,
|
|
"is_handout": true,
|
|
"is_reception": true,
|
|
"is_dressing_room": true,
|
|
"is_ltl": false,
|
|
"have_cashless": true,
|
|
"have_cash": true,
|
|
"have_fast_payment_system": false,
|
|
"allowed_cod": true,
|
|
"site": "https://www.cdek.ru/contacts/g_novosibirsk_ul_krivoshchekovskaya_15_korp_5_1_et.html",
|
|
"work_time_list": [
|
|
{
|
|
"day": 1,
|
|
"time": "08:00/22:00"
|
|
},
|
|
{
|
|
"day": 2,
|
|
"time": "08:00/22:00"
|
|
},
|
|
{
|
|
"day": 3,
|
|
"time": "08:00/22:00"
|
|
},
|
|
{
|
|
"day": 4,
|
|
"time": "08:00/22:00"
|
|
},
|
|
{
|
|
"day": 5,
|
|
"time": "08:00/22:00"
|
|
},
|
|
{
|
|
"day": 6,
|
|
"time": "10:00/18:00"
|
|
},
|
|
{
|
|
"day": 7,
|
|
"time": "10:00/18:00"
|
|
}
|
|
],
|
|
"work_time_exception_list": [],
|
|
"location": {
|
|
"country_code": "RU",
|
|
"region_code": 23,
|
|
"region": "Новосибирская область",
|
|
"city_code": 270,
|
|
"city": "Новосибирск",
|
|
"postal_code": "630007",
|
|
"longitude": 82.92912,
|
|
"latitude": 55.01591,
|
|
"address": "ул. Кривощековская, 15, корп.1",
|
|
"address_full": "630007, Россия, Новосибирская область, Новосибирск, ул. Кривощековская, 15, корп.1",
|
|
"city_uuid": "4e938d63-e189-454d-bb5c-54bfb2f1e4e2"
|
|
},
|
|
"fulfillment": false
|
|
},
|
|
{
|
|
"code": "NSK5",
|
|
"name": "NSK5, Новосибирск, пр-т Красный",
|
|
"uuid": "a3964112-40b4-4da5-ae87-315bab7469ad",
|
|
"work_time": "Пн-Пт 10:00-20:00, Сб 10:00-16:00, Вс 10:00-16:00",
|
|
"phones": [
|
|
{
|
|
"number": "+79833004613"
|
|
}
|
|
],
|
|
"email": "ks.biryukova@cdek.ru",
|
|
"type": "PVZ",
|
|
"owner_code": "CDEK",
|
|
"take_only": false,
|
|
"is_handout": true,
|
|
"is_reception": true,
|
|
"is_dressing_room": true,
|
|
"is_ltl": false,
|
|
"have_cashless": true,
|
|
"have_cash": true,
|
|
"have_fast_payment_system": false,
|
|
"allowed_cod": true,
|
|
"site": "https://www.cdek.ru/contacts/g_novosibirsk_krasnyy_prospekt_d_99.html",
|
|
"work_time_list": [
|
|
{
|
|
"day": 1,
|
|
"time": "10:00/20:00"
|
|
},
|
|
{
|
|
"day": 2,
|
|
"time": "10:00/20:00"
|
|
},
|
|
{
|
|
"day": 3,
|
|
"time": "10:00/20:00"
|
|
},
|
|
{
|
|
"day": 4,
|
|
"time": "10:00/20:00"
|
|
},
|
|
{
|
|
"day": 5,
|
|
"time": "10:00/20:00"
|
|
},
|
|
{
|
|
"day": 6,
|
|
"time": "10:00/16:00"
|
|
},
|
|
{
|
|
"day": 7,
|
|
"time": "10:00/16:00"
|
|
}
|
|
],
|
|
"work_time_exception_list": [],
|
|
"location": {
|
|
"country_code": "RU",
|
|
"region_code": 23,
|
|
"region": "Новосибирская область",
|
|
"city_code": 270,
|
|
"city": "Новосибирск",
|
|
"postal_code": "630049",
|
|
"longitude": 82.91155,
|
|
"latitude": 55.054855,
|
|
"address": "пр-т Красный, 99",
|
|
"address_full": "630049, Россия, Новосибирская область, Новосибирск, пр-т Красный, 99",
|
|
"city_uuid": "4e938d63-e189-454d-bb5c-54bfb2f1e4e2"
|
|
},
|
|
"fulfillment": false
|
|
},
|
|
{
|
|
"code": "NSK7",
|
|
"name": "NSK7, Новосибирск, ул. Зорге",
|
|
"uuid": "f16cc208-e1cf-4253-982b-22b30c62d18d",
|
|
"work_time": "Пн-Пт 10:00-20:00, Сб 10:00-16:00, Вс 10:00-16:00",
|
|
"phones": [
|
|
{
|
|
"number": "+79231555992"
|
|
}
|
|
],
|
|
"email": "A.Raevskiy@cdek.ru",
|
|
...
|
|
```
|