### 1. Получение токена авторизации CDEK POST {{base_url}}/v2/oauth/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials&client_id={{client_id}}&client_secret={{client_secret}} > {% client.global.set("auth_token", response.body.access_token); %} ### 2. Получение информации о заказе по номеру СДЭК GET {{base_url}}/v2/orders?cdek_number=10240410458 Authorization: Bearer {{auth_token}} ### 3. Регистрация заказа (тип "доставка", до двери) POST {{base_url}}/v2/orders Authorization: Bearer {{auth_token}} Content-Type: application/json { "type": 2, "tariff_code": 535, "comment": "Тестовый заказ", "sender": { "company": "ООО Ромашка", "name": "Петр Петров", "email": "sender@example.com", "phones": [ { "number": "+79009876543" } ] }, "recipient": { "name": "Иван Иванов", "email": "ivan@example.com", "phones": [ { "number": "+79001234567" } ] }, "from_location": { "address": "ул. Ленина, 1", "city": "Москва", "country_code": "RU" }, "to_location": { "address": "ул. Пушкина, 10", "city": "Новосибирск", "country_code": "RU" }, "services": [ { "code": "INSURANCE", "parameter": "1000" } ], "packages": [ { "number": "1", "weight": 1000, "length": 20, "width": 15, "height": 10, "comment": "Упаковка 1" } ] } > {% client.global.set("order_uuid", response.body.entity.uuid); %} ### 5. Список доступных тарифов GET {{base_url}}/v2/calculator/alltariffs Authorization: Bearer {{auth_token}} X-User-Lang: rus