Поиск роботов

Ищет роботов по фильтрам

Request

POST

/couriers/search

Body

application/json
{
  "limit": 1000,
  "offset": 0,
  "filters": {},
  "order": []
}

Name

Description

filters

Type: api__external__v2__couriers__models__SearchRequestFilters

Default: {}

limit

Type: integer

Default: 1000

Min value: 1

Max value: 1000

offset

Type: integer

Default: 0

Min value: 0

order

Type: string[]

В первом элементе массива нужно передать названия полей сортировки через запятую. Во втором элементе - направление сортировки asc или desc.

Default: []

Min items: 2

Max items: 2

Example
[
  "example",
  "example"
]

CourierShiftStatus

Type: string

Enum: off, free, on_delivery, on_battery_change, blocked

api__external__v2__couriers__models__SearchRequestFilters

Name

Description

identifier

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

shift_status_in

One of 2 types
Example
[
  "off"
]

shift_status_not_in

One of 2 types
Example
[
  "off"
]
Example
{
  "shift_status_in": [
    "off"
  ],
  "shift_status_not_in": [
    null
  ],
  "identifier": "example"
}

Responses

200 OK

Successful Response

Body

application/json
{
  "couriers": [
    {
      "name": "example",
      "vin": "example",
      "shift_status": "off",
      "hatch_status": "opening",
      "coordinates": [
        0.5,
        0.5
      ],
      "yaw": 0.5,
      "current_route": [
        null
      ],
      "fuel_level": 0,
      "claim": {
        "created_at": "2025-01-01T00:00:00Z",
        "updated_at": "2025-01-01T00:00:00Z",
        "finished_at": null,
        "id": "example",
        "route_points": [
          null
        ],
        "current_route_point_id": null,
        "external_id": null,
        "status": "new",
        "version": null,
        "user_request_revision": "example",
        "eta": null,
        "comment": null
      }
    }
  ]
}

Name

Description

couriers

Type: CourierInfoWithClaim[]

Example
[
  {
    "name": "example",
    "vin": "example",
    "shift_status": "off",
    "hatch_status": "opening",
    "coordinates": [
      0.5,
      0.5
    ],
    "yaw": 0.5,
    "current_route": [
      null
    ],
    "fuel_level": 0,
    "claim": {
      "created_at": "2025-01-01T00:00:00Z",
      "updated_at": "2025-01-01T00:00:00Z",
      "finished_at": "2025-01-01T00:00:00Z",
      "id": "example",
      "route_points": [
        {}
      ],
      "current_route_point_id": "example",
      "external_id": "example",
      "status": "new",
      "version": 0,
      "user_request_revision": "example",
      "eta": 0,
      "comment": "example"
    }
  }
]

HatchStatus

Type: string

Enum: opening, open, closing, closed

TupleCoordinate

Type: number[]

Min items: 2

Max items: 2

Example
[
  0.5,
  0.5
]

ClaimPointAddress

Name

Description

coordinates

Type: TupleCoordinate

Min items: 2

Max items: 2

Example
[
  0.5,
  0.5
]

building

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

building_name

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

city

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

comment

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

country

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

description

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

door_code

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

door_code_extra

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

doorbell_name

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

fullname

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

porch

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

sflat

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

sfloor

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

shortname

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

street

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

uri

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

Example
{
  "coordinates": [
    0.5,
    0.5
  ],
  "fullname": "example",
  "building": "example",
  "building_name": "example",
  "city": "example",
  "comment": "example",
  "country": "example",
  "description": "example",
  "door_code": "example",
  "door_code_extra": "example",
  "doorbell_name": "example",
  "porch": "example",
  "sflat": "example",
  "sfloor": "example",
  "shortname": "example",
  "street": "example",
  "uri": "example"
}

ClaimPointType

Type: string

Enum: source, destination, return

ClaimPointVisitStatus

Type: string

Enum: pending, on_the_way, arrived, in_exchange, completing, visited, skipping, skipped

ClaimPoint

Name

Description

address

Type: ClaimPointAddress

Example
{
  "coordinates": [
    0.5,
    0.5
  ],
  "fullname": "example",
  "building": "example",
  "building_name": "example",
  "city": "example",
  "comment": "example",
  "country": "example",
  "description": "example",
  "door_code": "example",
  "door_code_extra": "example",
  "doorbell_name": "example",
  "porch": "example",
  "sflat": "example",
  "sfloor": "example",
  "shortname": "example",
  "street": "example",
  "uri": "example"
}

id

Type: string

Example: example

type

One of 2 types
  • ClaimPointType

    Type: ClaimPointType

    Enum: source, destination, return

  • Type: string

    Example: example

Example: source

visit_order

Type: integer

visit_status

One of 2 types
  • ClaimPointVisitStatus

    Type: ClaimPointVisitStatus

    Enum: pending, on_the_way, arrived, in_exchange, completing, visited, skipping, skipped

  • Type: string

    Example: example

Example: pending

Example
{
  "address": {
    "coordinates": [
      0.5,
      0.5
    ],
    "fullname": "example",
    "building": "example",
    "building_name": "example",
    "city": "example",
    "comment": "example",
    "country": "example",
    "description": "example",
    "door_code": "example",
    "door_code_extra": "example",
    "doorbell_name": "example",
    "porch": "example",
    "sflat": "example",
    "sfloor": "example",
    "shortname": "example",
    "street": "example",
    "uri": "example"
  },
  "id": "example",
  "type": "source",
  "visit_order": 0,
  "visit_status": "pending"
}

ClaimStatus

Type: string

Enum: new, estimating, estimating_failed, performer_lookup, performer_draft, performer_found, performer_not_found, ready_for_approval, accepted, picking_up, pickup_arrived, ready_for_pickup_confirmation, picked_up, delivering, delivery_arrived, ready_for_delivery_confirmation, delivered, returning, return_arrived, ready_for_return_confirmation, returned, cancelled

Claim

Name

Description

created_at

Type: string<date-time>

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

id

Type: string

Example: example

route_points

Type: ClaimPoint[]

Example
[
  {
    "address": {
      "coordinates": [
        0.5,
        0.5
      ],
      "fullname": "example",
      "building": "example",
      "building_name": "example",
      "city": "example",
      "comment": "example",
      "country": "example",
      "description": "example",
      "door_code": "example",
      "door_code_extra": "example",
      "doorbell_name": "example",
      "porch": "example",
      "sflat": "example",
      "sfloor": "example",
      "shortname": "example",
      "street": "example",
      "uri": "example"
    },
    "id": "example",
    "type": "source",
    "visit_order": 0,
    "visit_status": "pending"
  }
]

status

Type: ClaimStatus

Enum: new, estimating, estimating_failed, performer_lookup, performer_draft, performer_found, performer_not_found, ready_for_approval, accepted, picking_up, pickup_arrived, ready_for_pickup_confirmation, picked_up, delivering, delivery_arrived, ready_for_delivery_confirmation, delivered, returning, return_arrived, ready_for_return_confirmation, returned, cancelled

updated_at

Type: string<date-time>

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

user_request_revision

Type: string

Example: example

version

One of 2 types
  • Type: integer

  • Type: string

    Example: example

Example: 0

comment

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

current_route_point_id

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

eta

One of 2 types
  • Type: integer

  • Type: null

    Example: null

В минутах

Example: 0

external_id

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

finished_at

One of 2 types
  • Type: string<date-time>

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

  • Type: null

    Example: null

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

Example
{
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-01T00:00:00Z",
  "finished_at": "2025-01-01T00:00:00Z",
  "id": "example",
  "route_points": [
    {
      "address": {
        "coordinates": [
          0.5,
          0.5
        ],
        "fullname": "example",
        "building": "example",
        "building_name": "example",
        "city": "example",
        "comment": "example",
        "country": "example",
        "description": "example",
        "door_code": "example",
        "door_code_extra": "example",
        "doorbell_name": "example",
        "porch": "example",
        "sflat": "example",
        "sfloor": "example",
        "shortname": "example",
        "street": "example",
        "uri": "example"
      },
      "id": "example",
      "type": "source",
      "visit_order": 0,
      "visit_status": "pending"
    }
  ],
  "current_route_point_id": "example",
  "external_id": "example",
  "status": "new",
  "version": 0,
  "user_request_revision": "example",
  "eta": 0,
  "comment": "example"
}

CourierInfoWithClaim

Name

Description

claim

One of 2 types
  • Claim

    Type: Claim

    Example
    {
      "created_at": "2025-01-01T00:00:00Z",
      "updated_at": "2025-01-01T00:00:00Z",
      "finished_at": "2025-01-01T00:00:00Z",
      "id": "example",
      "route_points": [
        {
          "address": {
            "coordinates": [
              0.5,
              0.5
            ],
            "fullname": "example",
            "building": "example",
            "building_name": "example",
            "city": "example",
            "comment": "example",
            "country": "example",
            "description": "example",
            "door_code": "example",
            "door_code_extra": "example",
            "doorbell_name": "example",
            "porch": "example",
            "sflat": "example",
            "sfloor": "example",
            "shortname": "example",
            "street": "example",
            "uri": "example"
          },
          "id": "example",
          "type": "source",
          "visit_order": 0,
          "visit_status": "pending"
        }
      ],
      "current_route_point_id": "example",
      "external_id": "example",
      "status": "new",
      "version": 0,
      "user_request_revision": "example",
      "eta": 0,
      "comment": "example"
    }
    
  • Type: null

    Example: null

Example
{
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-01T00:00:00Z",
  "finished_at": "2025-01-01T00:00:00Z",
  "id": "example",
  "route_points": [
    {
      "address": {
        "coordinates": [
          null,
          null
        ],
        "fullname": null,
        "building": null,
        "building_name": null,
        "city": null,
        "comment": null,
        "country": null,
        "description": null,
        "door_code": null,
        "door_code_extra": null,
        "doorbell_name": null,
        "porch": null,
        "sflat": null,
        "sfloor": null,
        "shortname": null,
        "street": null,
        "uri": null
      },
      "id": "example",
      "type": "source",
      "visit_order": 0,
      "visit_status": "pending"
    }
  ],
  "current_route_point_id": "example",
  "external_id": "example",
  "status": "new",
  "version": 0,
  "user_request_revision": "example",
  "eta": 0,
  "comment": "example"
}

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
]

current_route

One of 2 types
  • Type: TupleCoordinate[]

    Example
    [
      [
        0.5,
        0.5
      ]
    ]
    
  • Type: null

    Example: null

Example
[
  [
    0.5,
    0.5
  ]
]

fuel_level

One of 2 types
  • Type: integer

  • Type: null

    Example: null

Example: 0

hatch_status

One of 2 types
  • HatchStatus

    Type: HatchStatus

    Enum: opening, open, closing, closed

  • Type: null

    Example: null

Example: opening

name

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

shift_status

Type: CourierShiftStatus

Enum: off, free, on_delivery, on_battery_change, blocked

vin

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

yaw

One of 2 types
  • Type: number

  • Type: null

    Example: null

Example: 0.5

Example
{
  "name": "example",
  "vin": "example",
  "shift_status": "off",
  "hatch_status": "opening",
  "coordinates": [
    0.5,
    0.5
  ],
  "yaw": 0.5,
  "current_route": [
    null
  ],
  "fuel_level": 0,
  "claim": {
    "created_at": "2025-01-01T00:00:00Z",
    "updated_at": "2025-01-01T00:00:00Z",
    "finished_at": "2025-01-01T00:00:00Z",
    "id": "example",
    "route_points": [
      {
        "address": {},
        "id": "example",
        "type": null,
        "visit_order": 0,
        "visit_status": null
      }
    ],
    "current_route_point_id": "example",
    "external_id": "example",
    "status": "new",
    "version": 0,
    "user_request_revision": "example",
    "eta": 0,
    "comment": "example"
  }
}

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

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"
}
Предыдущая