Skip to main content

Get order by number

Receives the order by CDEK number or number from customer IB

Function GetOrderByNumber(Val Token, Val OrderNumber, Val Internal = False, Val TestAPI = False) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringAuth token
OrderNumber--numberStringOrder number
Internal--internalBooleanType of order number. True > number in the customer base, False > CDEK number
TestAPI--testapiBooleanFlag to use test API for requests

Returns: Map Of KeyAndValue - serialized JSON response from CDEK


tip

Method at API documentation: Order details


1C:Enterprise/OneScript code example
    Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3MzIyNjMyNTYsImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJjb250cmFjdDrQmNCcLdCg0KQt0JPQm9CTLTIyIiwiYWNjb3VudC1sYW5nOnJ1cyIsImFwaS12ZXJzaW9uOjEuMSIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJjb250cmFnZW50L...";

OrderNumber = "e762927d-3910-4ef2-8e38-9895fbe0474d";
Result = OPI_CDEK.GetOrderByNumber(Token, OrderNumber, True, True);
    oint cdek GetOrderByNumber \
--token "***" \
--number "666aef0d-3f1f-4640-91fe-91cada3d95e3" \
--internal true \
--testapi "***"
Result
{
"entity": {
"uuid": "a93fd1b1-55b3-4033-a52a-d2df7bb6b469",
"type": 1,
"is_return": false,
"is_reverse": false,
"cdek_number": "1106094897",
"number": "3d2378de-8718-4041-b89a-33e6058810c8",
"tariff_code": 139,
"comment": "New order",
"items_cost_currency": "RUB",
"recipient_currency": "RUB",
"delivery_recipient_cost": {
"value": 50,
"vat_sum": 0
},
"delivery_recipient_cost_adv": [
{
"threshold": 200,
"sum": 3000,
"vat_sum": 0
}
],
"sender": {
"company": "Тестирование Интеграции ИМ",
"name": "Petrov Petr",
"contragent_type": "LEGAL_ENTITY",
"passport_requirements_satisfied": false
},
"seller": {
"name": "Тестирование Интеграции ИМ"
},
"recipient": {
"company": "Ivaniv Ivan",
"name": "Ivaniv Ivan",
"phones": [
{
"number": "79134637228"
}
],
"passport_requirements_satisfied": false
},
"from_location": {
"code": 44,
"city_uuid": "7e8f36ba-d937-4ce4-8d53-e44177db6469",
"city": "Москва",
"fias_guid": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
"kladr_code": "7700000000000",
"country_code": "RU",
"country": "Россия",
"region": "Москва",
"region_code": 81,
"sub_region": "Москва",
"longitude": 37.61556,
"latitude": 55.75222,
"address": "Ave. Leningradsky, 4"
},
"to_location": {
"code": 270,
"city_uuid": "4e938d63-e189-454d-bb5c-54bfb2f1e4e2",
"city": "Новосибирск",
"kladr_code": "5400000100000",
"country_code": "RU",
"country": "Россия",
"region": "Новосибирская область",
"region_code": 23,
"sub_region": "городской округ Новосибирск",
"longitude": 82.906928,
"latitude": 55.028739,
"address": "st. Bluchera, 32"
},
"services": [
{
"code": "INSURANCE",
"parameter": "600.00",
"sum": 4.5,
"total_sum": 5.4,
"discount_percent": 0,
"discount_sum": 0,
"vat_rate": 20,
"vat_sum": 0.9
},
{
"code": "SECURE_PACKAGE_A2",
"parameter": "10",
"sum": 500,
"total_sum": 600,
"discount_percent": 0,
"discount_sum": 0,
"vat_rate": 20,
"vat_sum": 100
}
],
"packages": [
{
"number": "bar-001",
"barcode": "000000536893",
"weight": 4000,
"length": 10,
"width": 10,
"weight_volume": 200,
"weight_calc": 4000,
"height": 10,
"comment": "приложена опись",
"items": [
{
"name": "Product",
"ware_key": "00055",
"payment": {
"value": 3000,
"vat_sum": 0
},
"weight": 700,
"weight_gross": 700,
"amount": 2,
"delivery_amount": 0,
"url": "www.item.ru",
"return_item_detail": {},
"excise": false,
"cost": 300
}
],
"package_id": "9c103199-2372-4807-9682-184e10288b38"
}
],
"statuses": [
{
"code": "ACCEPTED",
"name": "Принят",
"date_time": "2024-10-21T21:27:08+03:00",
"city": "Офис СДЭК"
},
{
"code": "CREATED",
"name": "Создан",
"date_time": "2024-10-21T21:26:59+03:00",
"city": "Офис СДЭК"
}
],
"is_client_return": false,
"delivery_mode": "1",
"delivery_detail": {
"delivery_sum": 1315,
"total_sum": 2183.4,
"payment_info": [],
"delivery_vat_rate": 20,
"delivery_vat_sum": 263,
"delivery_discount_percent": 0,
"delivery_discount_sum": 0
},
...