Get events journal

Retrieves a list of events related to a courier, with optional cursor-based pagination

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

Type of change that occurred. Possible values:

  • order_created: Order was created
  • order_changed: Order was changed
  • order_completed: Order was completed
  • order_cancel_requested: Order cancellation was requested
  • shift_initialized: Shift was initialized
  • shift_created: Shift was created
  • shift_changed: Shift was changed
  • shift_completed: Shift was completed
  • open_hatch_requested: Opening of hatch was requested
  • close_hatch_requested: Closing of hatch was requested
  • closed_hatch_detected: Closed hatch was detected
  • battery_change_started: Battery change process started
  • battery_change_updated: Battery change process updated
  • battery_change_finished: Battery change process finished
  • move_to_base_point: Moving to base point
  • arrived_to_base_point: Arrived to base point
  • product_detection: Product detection event
  • terminate: Termination event
  • abort: Abort event

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

Possible values:

  • new: Order created, but robot not yet assigned
  • picking_up: Robot assigned and moving to pickup point
  • pickup_arrived: Robot arrived at pickup point
  • delivering: Robot moving to delivery point
  • delivery_arrived: Robot arrived at delivery point
  • delivered: Robot completed delivery
  • returning: Robot returning
  • return_arrived: Robot arrived at return point
  • returned: Robot completed return
  • cancelled: Order 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"
}