1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-05-27 23:07:37 +02:00
OpenIntegrations/docs/en/md/CDEK/Common-methods/Get-regions-list.mdx
Vitaly the Alpaca (bot) 36a4920eb7 Main build (Jenkins)
2025-01-11 21:13:24 +03:00

215 lines
5.1 KiB
Plaintext
Vendored

---
sidebar_position: 6
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get regions list
Gets the list of available regions
`Function GetRegionsList(Val Token, Val Countrues = Undefined, Val Page = 0, Val Lang = "rus", Val TestAPI = False) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Auth token |
| Countrues | --countries | Array Of String | ✖ | Array of country codes in ISO_31661_alpha2 format for selection |
| Page | --page | Number | ✖ | Result page |
| Lang | --lang | String | ✖ | Language: rus, eng, zho |
| 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 Regions](https://api-docs.cdek.ru/33829453.html)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3MzY2MjEyMzYsImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJhY2NvdW50LWxhbmc6cnVzIiwiY29udHJhY3Q60JjQnC3QoNCkLdCT0JvQky0yMiIsImFwaS12ZXJzaW9uOjEuMSIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJjb250cmFnZW50L...";
Result = OPI_CDEK.GetRegionsList(Token, , , , True);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint cdek GetRegionsList \
--token "***" \
--testapi "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint cdek GetRegionsList ^
--token "***" ^
--testapi "***"
```
</TabItem>
</Tabs>
```json title="Result"
[
{
"country_code": "ES",
"country": "Испания",
"region": "Галисия",
"region_code": 482
},
{
"country_code": "RO",
"country": "Румыния",
"region": "Западный регион",
"region_code": 1552
},
{
"country_code": "PT",
"country": "Португалия",
"region": "Сантарен",
"region_code": 1281
},
{
"country_code": "RS",
"country": "Сербия",
"region": "Моравичский округ",
"region_code": 1639
},
{
"country_code": "EE",
"country": "Эстония",
"region": "Уезд Вильяндимаа",
"region_code": 1508
},
{
"country_code": "IT",
"country": "Италия",
"region": "Пьемонт",
"region_code": 712
},
{
"country_code": "FI",
"country": "Финляндия",
"region": "Кайнуу",
"region_code": 221
},
{
"country_code": "HR",
"country": "Хорватия",
"region": "Сплитско-Далматинская жупания",
"region_code": 1581
},
{
"country_code": "LV",
"country": "Латвия",
"region": "Вентспилс",
"region_code": 1472
},
{
"country_code": "KG",
"country": "Киргизия",
"region": "Баткенская область",
"region_code": 1727
},
{
"country_code": "TR",
"country": "Турция",
"region": "Газиантеп",
"region_code": 408
},
{
"country_code": "IT",
"country": "Италия",
"region": "Лацио",
"region_code": 561
},
{
"country_code": "JP",
"country": "Япония",
"region": "Префектура Сага",
"region_code": 733
},
{
"country_code": "MD",
"country": "Молдавия",
"region": "Хынчештский район",
"region_code": 1773
},
{
"country_code": "US",
"country": "США",
"region": "Пенсильвания",
"region_code": 695
},
{
"country_code": "FI",
"country": "Финляндия",
"region": "Северная Карелия",
"region_code": 1182
},
{
"country_code": "MZ",
"country": "Мозамбик",
"region": "Мозамбик",
"region_code": 613
},
{
"country_code": "RU",
"country": "Россия",
"region": "Белгородская область",
"region_code": 16
},
{
"country_code": "BE",
"country": "Бельгия",
"region": "Намюр",
"region_code": 1540
},
{
"country_code": "EE",
"country": "Эстония",
"region": "Уезд Ляэнемаа",
"region_code": 1513
},
{
"country_code": "TR",
"country": "Турция",
"region": "Сивас",
"region_code": 772
},
{
"country_code": "HU",
"country": "Венгрия",
"region": "медье Пешт",
"region_code": 699
},
{
"country_code": "HU",
"country": "Венгрия",
"region": "медье Тольна",
"region_code": 1588
},
{
"country_code": "GR",
"country": "Греция",
"region": "периферия Южные Эгейские острова",
"region_code": 173
},
{
"country_code": "BG",
"country": "Болгария",
"region": "Габровская область",
"region_code": 405
...
```