Создать заявку

Создаёт новую заявку в системе Robodelivery

external_order_id может быть использован для связывания заявки с заказом в внешней системе.

Вы можете указать условия для ограничения поиска робота.

Request

POST

/claims/create

Query parameters

Name

Description

idempotency_key

Type: string

A string used to ensure idempotency of the request.
A string used to ensure idempotency of the request.

Example: ``

Body

application/json
{
  "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"
      },
      "point_id": "example",
      "type": "source",
      "visit_order": 0
    },
    {
      "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"
      },
      "point_id": "example",
      "type": "source",
      "visit_order": 0
    }
  ],
  "external_order_id": "example",
  "comment": "example",
  "conditions": {}
}

Name

Description

route_points

Type: ClaimRequestPoint[]

Min items: 2

Max items: 3

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"
    },
    "point_id": "example",
    "type": "source",
    "visit_order": 0
  },
  {
    "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"
    },
    "point_id": "example",
    "type": "source",
    "visit_order": 0
  }
]

comment

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

conditions

Type: CreateRequestConditions

Default: {}

external_order_id

One of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Example: example

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

ClaimRequestPoint

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"
}

point_id

Type: string

Example: example

type

Type: ClaimPointType

Enum: source, destination, return

visit_order

Type: integer

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"
  },
  "point_id": "example",
  "type": "source",
  "visit_order": 0
}

CreateRequestConditions

Name

Description

maximum_first_point_eta

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

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

  • Type: null

    Example: null

Поиск будет ограничен курьерами, которые смогут прибыть в исходную точку до разрешенного расчетного времени прибытия.

Сервис ожидает дату и время с указанием часового пояса. Примеры форматов:

  • 2026-01-11 17:26:27.704301+00:00
  • 2026-01-11T19:18:43Z

Если часовой пояс не указан, сервис считает, что это UTC+0.

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

robot_vins

One of 2 types
  • Type: string[]

    Example
    [
      "example"
    ]
    
  • Type: null

    Example: null

Список VIN роботов для рассмотрения для этой заявки. Если указано, только эти роботы будут рассматриваться для назначения

Example
[
  "example"
]

search_until

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

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

  • Type: null

    Example: null

Поиск прекратится по истечении указанного времени и завершится неудачей.

Сервис ожидает дату и время с указанием часового пояса. Примеры форматов:

  • 2026-01-11 17:26:27.704301+00:00
  • 2026-01-11T19:18:43Z

Если часовой пояс не указан, сервис считает, что это UTC+0.

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

Example
{
  "maximum_first_point_eta": "2025-01-01T00:00:00Z",
  "search_until": "2025-01-01T00:00:00Z",
  "robot_vins": [
    "example"
  ]
}

Responses

200 OK

Successful Response

Body

application/json
{
  "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"
}

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

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

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"
}