Получить начальный курсор изменений рейсов заказчика

Порядок работы для агента · Методы API и схема OpenAPI.

Назначение

Передайте границу чтения в data.toTime в формате RFC 3339. Возьмите курсор из data.id. Если записей до границы нет, курсор равен 0. Для одной организации укажите её идентификатор в data.forwarderId и проверьте право flight_view_changes в ней.

Блоки запроса и ответов ниже сгенерированы из OpenAPI. Подстановки вроде example показывают структуру JSON. Для вызова возьмите значения из сценария, справочников или предыдущих ответов API.

Request

POST

https://partner-test-yamagistrali.ru/api/flights/changesForForwarders/getLastLogId/v0

Тестовый стенд

Body

application/json
{
  "data": {
    "forwarderId": "example",
    "toTime": "2025-07-22T20:21:19.773333823Z"
  }
}

Name

Description

data

Type: FlightsChangesForForwardersGetLastLogIdV0Request

Example
{
  "forwarderId": "example",
  "toTime": "2025-07-22T20:21:19.773333823Z"
}

FlightsChangesForForwardersGetLastLogIdV0Request

Name

Description

forwarderId

Type: string | null

Example: example

toTime

Type: string | null

Example: 2025-07-22T20:21:19.773333823Z

Example
{
  "forwarderId": "example",
  "toTime": "2025-07-22T20:21:19.773333823Z"
}

Responses

200 OK

OK

Body

application/json
{
  "data": {
    "id": 0
  }
}

Name

Description

data

Type: FlightsChangesForForwardersGetLastLogIdV0Response

Example
{
  "id": 0
}

FlightsChangesForForwardersGetLastLogIdV0Response

Name

Description

id

Type: integer

Example
{
  "id": 0
}

400 Bad Request

Bad Request

Body

application/json
{
  "error": {
    "info": {},
    "message": "example",
    "message_code": "example"
  }
}

Name

Description

error

Type: Error

Example
{
  "info": {},
  "message": "example",
  "message_code": "example"
}

Error

Name

Description

info

Type: object

Example
{}

message

Type: string

Example: example

message_code

Type: string

Example: example

Example
{
  "info": {},
  "message": "example",
  "message_code": "example"
}

403 Forbidden

Forbidden

Body

application/json
{
  "error": {
    "info": {},
    "message": "example",
    "message_code": "example"
  }
}

Name

Description

error

Type: Error

Example
{
  "info": {},
  "message": "example",
  "message_code": "example"
}

500 Internal Server Error

Internal Server Error

Body

application/json
{
  "error": {
    "info": {},
    "message": "example",
    "message_code": "example"
  }
}

Name

Description

error

Type: Error

Example
{
  "info": {},
  "message": "example",
  "message_code": "example"
}