Создать рейс
Порядок работы для агента · Методы API и схема OpenAPI.
Назначение
Создайте пустой рейс. Передайте организацию исполнителя в data.executerId и название в data.flightName. Сохраните data.id для последующего добавления задач.
Блоки запроса и ответов ниже сгенерированы из OpenAPI. Подстановки вроде
exampleпоказывают структуру JSON. Для вызова возьмите значения из сценария, справочников или предыдущих ответов API.
Request
POST
https://partner-test-yamagistrali.ru/api/flights/create/v1
Тестовый стенд
Body
application/json
{
"data": {
"executerId": "example",
"flightName": "example"
}
}
|
Name |
Description |
|
data |
Type: FlightCreateV1Request Example
|
FlightCreateV1Request
|
Name |
Description |
|
executerId |
Type: string Example: |
|
flightName |
Type: string Example: |
Example
{
"executerId": "example",
"flightName": "example"
}
Responses
200 OK
OK
Body
application/json
{
"data": {
"id": "example"
}
}
|
Name |
Description |
|
data |
Type: FlightCreateV1Response Example
|
FlightCreateV1Response
|
Name |
Description |
|
id |
Type: string Example: |
Example
{
"id": "example"
}
400 Bad Request
Bad Request
Body
application/json
{
"error": {
"info": {},
"message": "example",
"message_code": "example"
}
}
|
Name |
Description |
|
error |
Type: Error Example
|
Error
|
Name |
Description |
|
info |
Type: object Example
|
|
message |
Type: string Example: |
|
message_code |
Type: string 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
|
500 Internal Server Error
Internal Server Error
Body
application/json
{
"error": {
"info": {},
"message": "example",
"message_code": "example"
}
}
|
Name |
Description |
|
error |
Type: Error Example
|