API интеграция Lastauka

Postman collection → OpenAPI spec →

Introduction

Клиентская документация по настройке интеграции через API.
Для вашего удобства информация по доступному функционалу разбита по разделам.

Авторизация

Для взаимодействия с сервисом требуется API токен.

Чтобы узнать свой API токен, необходимо зайти в раздел "Интеграция" в Личном кабинете

Далее при обращении к методам сервиса полученный токен передается в заголовке запроса в следующем виде:

Адреса

Нормализация адреса

POST
https://lastauka.by
/api/v1/address-clean
requires authentication

Разделяет и помещает сущности переданных адресов (город, улица) в соответствующие поля возвращаемого объекта.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/address-clean';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'address' => 'Россия, Смоленская область, Смоленск, ул. Авиаторов, д. 9',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response:
{
    "city": {
        "id": 123,
        "name": "Смоленск"
    },
    "district": null,
    "region": {
        "id": 67,
        "name": "Смоленская область"
    },
    "street": "Авиаторов",
    "house": "9",
    "corpus": null,
    "entrance": null,
    "floor": "1",
    "room": "1",
    "index": "214000",
    "unrestricted_value": "Россия, Смоленская область, Смоленск, улица Авиаторов, дом 9, кв 1",
    "value": "Россия, Смоленская область, Смоленск, ул. Авиаторов д. 9"
}

Заказы

Получение списка заказов

GET
https://lastauka.by
/api/v1/orders
requires authentication

Метод предназначен для получения списка заказов.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

filter[tc_id]
integer

ID транспортной компании.

Example:
1
filter[track]
string

Трек-номер Lastauka или список трек-номеров через запятую.

Example:
la-1017
filter[tc_track]
string

Трек-номер транспортной компании или список трек-номеров через запятую.

Example:
19804910834123978
per_page
integer

Количество заказов на странице (минимум 10, максимум 50).

Example:
20
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/orders';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'filter[tc_id]' => '1',
            'filter[track]' => 'la-1017',
            'filter[tc_track]' => '19804910834123978',
            'per_page' => '20',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response:

Информация о заказе

GET
https://lastauka.by
/api/v1/order/{track}
requires authentication

Метод предназначен для получения детальной информации по заданному заказу. Есть возможность получить информацию в том числе о заказах, которые были созданы через другие каналы (личный кабинет и др.).

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

track
string
required

Трек-номер посылки

Example:
la-1017

Response Fields

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/order/la-1017';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response:
{
    "id": 1,
    "address_to": {
        "city": "Москва",
        "room": "1",
        "floor": "1",
        "house": "9",
        "corpus": null,
        "region": "Московская область",
        "street": "Авангардная",
        "district": null,
        "entrance": null,
        "country": "Россия"
    },
    "address_from": {
        "city": "Брест",
        "room": "1",
        "floor": "1",
        "house": "9",
        "corpus": null,
        "region": "Брестская область",
        "street": "Буденного",
        "district": null,
        "entrance": null,
        "country": "Беларусь"
    },
    "recipient": {
        "email": "exmail@example.com",
        "phone": "+7 809 111 11 11",
        "last_name": "Иванов",
        "first_name": "Иван",
        "patronymic_name": "Иванович"
    },
    "sender": {
        "email": "exmail@example.com",
        "phone": "+375 29 111 11 11",
        "last_name": "Иванов",
        "first_name": "Иван",
        "patronymic_name": "Иванович"
    },
    "dimension": {
        "length": 10,
        "width": 10,
        "height": 10,
        "weight": 12.5
    },
    "tc": {
        "id": 1,
        "name": "Почта России"
    },
    "delivery_type": {
        "id": 1,
        "name": "Пункт выдачи - пункт выдачи"
    },
    "delivery_time": {
        "min_days": 2,
        "max_days": 5
    },
    "items": [],
    "cod_value": 100,
    "comment": "Очень важная информация",
    "completed_at": null,
    "created_at": "2026-03-26 12:00:00",
    "delivery_price": 250.5,
    "declared_value": 100,
    "label": "",
    "order_num": "12345",
    "statuses": [],
    "track": "la-1017",
    "track_tc": "19804910834123978"
}

Создание заказа

POST
https://lastauka.by
/api/v1/orders
requires authentication

Метод предназначен для создания в Lastauka заказа на доставку товаров до покупателей.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/orders';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'recipient' => [
                'phone' => '+7 809 111 11 11',
                'first_name' => 'Иван',
                'last_name' => 'Иванов',
            ],
            'dimension' => [
                'weight' => 12.5,
                'length' => 16,
                'width' => 5,
                'height' => 1,
            ],
            'extraServices' => [
                'completeness_checking' => false,
                'sms_notice_recipient' => false,
                'recipient_pay' => false,
            ],
            'point' => [
                'id' => 1,
                'code' => '99951',
            ],
            'delivery_type_id' => 1.0,
            'tc_id' => 1.0,
            'declared_value' => 100.0,
            'address_to' => [
                'country' => 'autem',
                'region' => 'modi',
                'city' => 'qui',
                'street' => 'distinctio',
            ],
            'items' => [
                [
                    'name' => 'architecto',
                    'weight' => 18,
                    'declared_value' => 4,
                    'quantity' => 44,
                    'code' => 'consequatur',
                ],
            ],
            'cargoPlaces' => [
                [
                    'dimension' => [
                        'weight' => 9,
                        'length' => 90,
                        'width' => 0,
                        'height' => 9,
                    ],
                    'declared_value' => 6,
                    'order_num' => 'non',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response:
{
    "id": 1,
    "address_to": {
        "city": "Москва",
        "room": "1",
        "floor": "1",
        "house": "9",
        "corpus": null,
        "region": "Московская область",
        "street": "Авангардная",
        "district": null,
        "entrance": null,
        "country": "Россия"
    },
    "address_from": {
        "city": "Брест",
        "room": "1",
        "floor": "1",
        "house": "9",
        "corpus": null,
        "region": "Брестская область",
        "street": "Буденного",
        "district": null,
        "entrance": null,
        "country": "Беларусь"
    },
    "recipient": {
        "email": "exmail@example.com",
        "phone": "+7 809 111 11 11",
        "last_name": "Иванов",
        "first_name": "Иван",
        "patronymic_name": "Иванович"
    },
    "sender": {
        "email": "exmail@example.com",
        "phone": "+375 29 111 11 11",
        "last_name": "Иванов",
        "first_name": "Иван",
        "patronymic_name": "Иванович"
    },
    "dimension": {
        "length": 10,
        "width": 10,
        "height": 10,
        "weight": 12.5
    },
    "tc": {
        "id": 1,
        "name": "Почта России"
    },
    "delivery_type": {
        "id": 1,
        "name": "Пункт выдачи - пункт выдачи"
    },
    "delivery_time": {
        "min_days": 2,
        "max_days": 5
    },
    "items": [],
    "cod_value": 100,
    "comment": "Очень важная информация",
    "completed_at": null,
    "created_at": "2026-03-26 12:00:00",
    "delivery_price": 250.5,
    "declared_value": 100,
    "label": "",
    "order_num": "12345",
    "statuses": [],
    "track": "la-1017",
    "track_tc": "19804910834123978"
}

Удаление заказа

DELETE
https://lastauka.by
/api/v1/orders/{track}
requires authentication

Метод предназначен для удаления заказа.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

track
integer
required
Example:
129
orderId
integer
required

ID заказа в системе Lastauka

Example:
1
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/orders/129';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Заказы. Первая миля

Создание заявки на первую милю

POST
https://lastauka.by
/api/v1/first-mile
requires authentication

Метод предназначен для создания в Lastauka заявки на первую милю.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/first-mile';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'dimension' => [
                'weight' => 12.5,
            ],
            'address_to' => [
                'value' => 'Россия, Смоленская область, Смоленск, ул. Авиаторов д. 9',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response:
{
    "id": 1,
    "address_to": {
        "city": "Смоленск",
        "corpus": null,
        "country": "Россия",
        "district": null,
        "entrance": null,
        "floor": "1",
        "house": "9",
        "region": "Смоленская область",
        "room": "1",
        "street": "Авиаторов"
    },
    "address_from": {
        "city": "Брест",
        "corpus": null,
        "country": "Беларусь",
        "district": null,
        "entrance": null,
        "floor": "1",
        "house": "9",
        "region": "Брестская область",
        "room": "1",
        "street": "Буденного"
    },
    "recipient": {
        "email": "exmail@example.com",
        "first_name": "Иван",
        "last_name": "Иванов",
        "legal_address": null,
        "organization_name": null,
        "patronymic_name": "Иванович",
        "phone": "+7 809 111 11 11"
    },
    "sender": {
        "email": "exmail@example.com",
        "first_name": "Иван",
        "last_name": "Иванов",
        "patronymic_name": "Иванович",
        "phone": "+375 29 111 11 11"
    },
    "legal_data": {
        "bic": "123456789",
        "director": "Иванов Иван Иванович",
        "legal_address": "Брест ул. Буденного д. 9",
        "mailing_address": "email@ya.ru",
        "organization_name": "ООО \"Организация\"",
        "payment_account": "0000000000000000000000000000",
        "recipient_bank": "ОАО \"Банк\"",
        "unp": "123456789"
    },
    "dimension": {
        "height": 10,
        "length": 10,
        "weight": 12.5,
        "width": 10
    },
    "comment": "Очень важная информация",
    "created_at": "2026-03-26 12:00:00",
    "declared_value": 100,
    "delivery_price": 250.5,
    "label": "",
    "statuses": [],
    "track": "la-1017"
}

Информация о заявке на первую милю

GET
https://lastauka.by
/api/v1/first-mile/{track}
requires authentication

Метод предназначен для получения детальной информации о заявке на первую милю. Есть возможность получить информацию в том числе о заказах, которые были созданы через другие каналы (личный кабинет и др.).

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

track
string
required

Трек-номер посылки

Example:
la-1017

Response Fields

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/first-mile/la-1017';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response:
{
    "id": 1,
    "address_to": {
        "city": "Смоленск",
        "corpus": null,
        "country": "Россия",
        "district": null,
        "entrance": null,
        "floor": "1",
        "house": "9",
        "region": "Смоленская область",
        "room": "1",
        "street": "Авиаторов"
    },
    "address_from": {
        "city": "Брест",
        "corpus": null,
        "country": "Беларусь",
        "district": null,
        "entrance": null,
        "floor": "1",
        "house": "9",
        "region": "Брестская область",
        "room": "1",
        "street": "Буденного"
    },
    "recipient": {
        "email": "exmail@example.com",
        "first_name": "Иван",
        "last_name": "Иванов",
        "legal_address": null,
        "organization_name": null,
        "patronymic_name": "Иванович",
        "phone": "+7 809 111 11 11"
    },
    "sender": {
        "email": "exmail@example.com",
        "first_name": "Иван",
        "last_name": "Иванов",
        "patronymic_name": "Иванович",
        "phone": "+375 29 111 11 11"
    },
    "legal_data": {
        "bic": "123456789",
        "director": "Иванов Иван Иванович",
        "legal_address": "Брест ул. Буденного д. 9",
        "mailing_address": "email@ya.ru",
        "organization_name": "ООО \"Организация\"",
        "payment_account": "0000000000000000000000000000",
        "recipient_bank": "ОАО \"Банк\"",
        "unp": "123456789"
    },
    "dimension": {
        "height": 10,
        "length": 10,
        "weight": 12.5,
        "width": 10
    },
    "comment": "Очень важная информация",
    "created_at": "2026-03-26 12:00:00",
    "declared_value": 100,
    "delivery_price": 250.5,
    "label": "",
    "statuses": [],
    "track": "la-1017"
}

Удаление заявки на первую милю

DELETE
https://lastauka.by
/api/v1/first-mile/{track}
requires authentication

Метод предназначен для удаления заявки на первую милю.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

track
string
required

Трек-номер посылки

Example:
la-1017
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/first-mile/la-1017';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Населенные пункты, отделения

Список отделений

GET
https://lastauka.by
/api/v1/points
requires authentication

Позволяет получить информацию о всех отделениях. Список отделений может быть ограничен характеристиками, задаваемыми пользователем.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

filter
object
Example:
[]
filter.city_id
integer

The id of an existing record in the cities table.

Example:
13
filter.tc_id
integer
Must be one of:
  • 1
  • 6
  • 7
Example:
7
page
integer

Текущая страница.

Example:
1
per_page
integer

Количество элементов на странице (Минимум 100, максимум 1000, по умолчанию 100).

Example:
100
filter[type_id]
integer

Тип отделения. Example: 1
1 - Отделение почтовой связи
2 - Пункт выдачи
3 - Постамат
4 - Касса

Example:
1
filter[tc_id]
integer

ID транспортной компании. Example: 1
1 - Почтра России
6 - FivePost
7 - DPD

Example:
1
filter[city_id]
integer

ID города.

Example:
1
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/points';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'filter[city_id]' => '13',
            'filter[tc_id]' => '7',
            'page' => '1',
            'per_page' => '100',
            'filter[type_id]' => '1',
            'filter[tc_id]' => '1',
            'filter[city_id]' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response:
{
    "data": [
        {
            "id": 1,
            "tc_id": 1,
            "tc_name": "Почта России",
            "type_id": 2,
            "code": "99951",
            "address": "998200 г Москва, Сиреневый б-р, д. 73, к. 1",
            "index": "998200",
            "description": "Почтомат расположен в библиотеке № 81.",
            "city": {
                "id": 1,
                "name": "Москва"
            },
            "region": {
                "id": 17,
                "name": "Московская область"
            },
            "country": {
                "id": 1,
                "name": "Россия"
            },
            "options": {
                "allowed_cod": true,
                "card_payment": false,
                "cash_payment": false,
                "contents_checking": false,
                "partial_redemption": false,
                "return_available": false,
                "with_fitting": false
            },
            "limits": {
                "max_weight": 20,
                "max_length": 100,
                "max_width": 100,
                "max_height": 100
            },
            "geo_latitude": 55.803637,
            "geo_longitude": 42.794572,
            "work_time": [
                "пн, открыто: 10:00 - 16:30, перерыв: 12:00 - 12:30",
                "вт, выходной"
            ]
        }
    ],
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "per_page": 100,
        "to": 1,
        "total": 1
    }
}

Список населенных пунктов

GET
https://lastauka.by
/api/v1/cities
requires authentication

Позволяет получить список населенных пунктов, в которых есть отделения транспортных компаний. Список населенных пунктов может быть ограничен характеристиками, задаваемыми пользователем.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

page
integer

Текущая страница.

Example:
1
per_page
integer

Количество элементов на странице (Минимум 100, максимум 1000, по умолчанию 100).

Example:
100
filter[tc_id]
integer

ID транспортной компании. Example: 1
1 - Почтра России
6 - FivePost
7 - DPD

Example:
1
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/cities';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '100',
            'filter[tc_id]' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response:
{
    "data": [
        {
            "id": 253,
            "name": "Прохоровка",
            "tc_ids": [
                1,
                6
            ],
            "country": {
                "id": 1,
                "name": "Россия"
            },
            "region": {
                "id": 17,
                "name": "Белгородская"
            },
            "district": {
                "id": 17,
                "name": "Прохоровский"
            }
        }
    ],
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "per_page": 100,
        "to": 1,
        "total": 1
    }
}

Расчет стоимости доставки

Список тарифов

POST
https://lastauka.by
/api/v1/tariff/list
requires authentication

Метод позволяет получить список тарифов(стоимость и срок доставки), транспортных компаний, для указанного адреса. Стоимость приблизительна и может отличаться от реальной стоимости доставки. Для получения более точной стоимости доставки необходимо использовать метод "Расчет стоимости доставки".

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://lastauka.by/api/v1/tariff/list';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'dimension' => [
                'weight' => 12.5,
                'length' => 10.0,
                'width' => 10.0,
                'height' => 10.0,
            ],
            'address_to' => [
                'value' => 'Россия, Московская область, Москва, ул. Авангардная д. 9',
            ],
            'cod_value' => 100.0,
            'declared_value' => 100.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response:
[
    {
        "address": "Россия, Москва, ул. Авангардная, д. 9",
        "name": "Стандарт",
        "city": "Москва",
        "tc": {
            "id": 1,
            "name": "Почта России"
        },
        "delivery_type": {
            "id": 1,
            "name": "Пункт выдачи - пункт выдачи"
        },
        "total_price": 250.5,
        "delivery_time": {
            "min": 2,
            "max": 5
        }
    }
]