Получить журнал событий

Возвращает список событий, связанных с курьером, с использованием пагинации по курсору

Request

POST

/couriers/journal

Query parameters

Name

Description

vin

Type: string

Vehicle Identification Number that uniquely identifies robot
Vehicle Identification Number that uniquely identifies robot

Example: ``

Body

application/json

undefined

Name

Description

cursor

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

Responses

200 OK

Successful Response

Body

application/json
{
  "cursor": "example",
  "events": [
    {
      "event_id": "example",
      "change_type": "example",
      "claim_id": "example",
      "courier_id": "example",
      "shift_id": "example",
      "timestamp": "2025-01-01T00:00:00Z",
      "new_value": "example",
      "courier_coordinates": [
        0.5,
        0.5
      ]
    }
  ]
}

Name

Description

cursor

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

events

Type: JournalEvent[]

Example
[
  {
    "event_id": "example",
    "change_type": "example",
    "claim_id": "example",
    "courier_id": "example",
    "shift_id": "example",
    "timestamp": "2025-01-01T00:00:00Z",
    "new_value": "example",
    "courier_coordinates": [
      0.5,
      0.5
    ]
  }
]

TupleCoordinate

Type: number[]

Min items: 2

Max items: 2

Example
[
  0.5,
  0.5
]

JournalEvent

Name

Description

change_type

Type: string

Тип произошедшего изменения. Возможные значения:

  • order_created: Заказ был создан
  • order_changed: Заказ был изменен
  • order_completed: Заказ был завершен
  • order_cancel_requested: Запрошена отмена заказа
  • shift_initialized: Смена инициализирована
  • shift_created: Смена создана
  • shift_changed: Смена изменена
  • shift_completed: Смена завершена
  • open_hatch_requested: Запрошено открытие крышки
  • close_hatch_requested: Запрошено закрытие крышки
  • closed_hatch_detected: Обнаружена закрытая крышка
  • battery_change_started: Начата замена батареи
  • battery_change_updated: Обновлена замена батареи
  • battery_change_finished: Завершена замена батареи
  • move_to_base_point: Перемещение в базовую точку
  • arrived_to_base_point: Прибытие в базовую точку
  • product_detection: Обнаружение продукта
  • terminate: Завершение
  • abort: Прерывание

Example: example

claim_id

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

courier_id

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

event_id

Type: string

Example: example

new_value

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Возможные значения:

  • new: Заказ создан, но робот еще не назначен
  • picking_up: Робот назначен и движется к точке получения
  • pickup_arrived: Робот прибыл в точку получения
  • delivering: Робот движется к точке доставки
  • delivery_arrived: Робот прибыл в точку доставки
  • delivered: Робот завершил доставку
  • returning: Робот возвращается
  • return_arrived: Робот прибыл в точку возврата
  • returned: Робот завершил возврат
  • cancelled: Заказ отменен

Example: example

shift_id

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

timestamp

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

courier_coordinates

One of 2 types
  • Type: TupleCoordinate

    Min items: 2

    Max items: 2

    Example
    [
      0.5,
      0.5
    ]
    
  • Type: null

    Example: null

Example
[
  0.5,
  0.5
]
Example
{
  "event_id": "example",
  "change_type": "example",
  "claim_id": "example",
  "courier_id": "example",
  "shift_id": "example",
  "timestamp": "2025-01-01T00:00:00Z",
  "new_value": "example",
  "courier_coordinates": [
    0.5,
    0.5
  ]
}

401 Unauthorized

Unauthorized

Body

application/json
{
  "code": "UNAUTHORIZED",
  "message": "example"
}

Name

Description

code

Type: string

Default: UNAUTHORIZED

Const: UNAUTHORIZED

Enum: UNAUTHORIZED

message

Type: string

Example: example

403 Forbidden

Forbidden

Body

application/json
{
  "code": "FORBIDDEN",
  "message": "example"
}

Name

Description

code

Type: string

Default: FORBIDDEN

Const: FORBIDDEN

Enum: FORBIDDEN

message

Type: string

Example: example

404 Not Found

Not Found

Body

application/json
{
  "code": "NOT_FOUND",
  "message": "example"
}

Name

Description

code

Type: string

Default: NOT_FOUND

Const: NOT_FOUND

Enum: NOT_FOUND

message

Type: string

Example: example

422 Unprocessable Entity

Validation Error

Body

application/json
{
  "detail": [
    {
      "loc": [
        "example"
      ],
      "msg": "example",
      "type": "example"
    }
  ]
}

Name

Description

detail

Type: ValidationError[]

Example
[
  {
    "loc": [
      "example"
    ],
    "msg": "example",
    "type": "example"
  }
]

ValidationError

Name

Description

loc

Type: array
One of 2 types
  • Type: string

    Example: example

  • Type: integer

Example
[
  "example"
]

msg

Type: string

Example: example

type

Type: string

Example: example

Example
{
  "loc": [
    "example"
  ],
  "msg": "example",
  "type": "example"
}
Предыдущая
Следующая