Create claim
Creates a new claim in the Robodelivery system.
The external_order_id can be used to link the claim with an order in an external system.
You may provide conditions to limit the search for a robot.
Request
POST
/claims/create
Query parameters
|
Name |
Description |
|
idempotency_key |
Type: string 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: Max items: Example
|
|
comment |
One of 2 types
Example: |
|
conditions |
Type: CreateRequestConditions Default: |
|
external_order_id |
One of 2 types
Example: |
TupleCoordinate
Type: number[]
Min items: 2
Max items: 2
Example
[
0.5,
0.5
]
ClaimPointAddress
|
Name |
Description |
|
coordinates |
Type: TupleCoordinate Min items: Max items: Example
|
|
building |
One of 2 types
Example: |
|
building_name |
One of 2 types
Example: |
|
city |
One of 2 types
Example: |
|
comment |
One of 2 types
Example: |
|
country |
One of 2 types
Example: |
|
description |
One of 2 types
Example: |
|
door_code |
One of 2 types
Example: |
|
door_code_extra |
One of 2 types
Example: |
|
doorbell_name |
One of 2 types
Example: |
|
fullname |
One of 2 types
Example: |
|
porch |
One of 2 types
Example: |
|
sflat |
One of 2 types
Example: |
|
sfloor |
One of 2 types
Example: |
|
shortname |
One of 2 types
Example: |
|
street |
One of 2 types
Example: |
|
uri |
One of 2 types
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
|
|
point_id |
Type: string Example: |
|
type |
Type: ClaimPointType Enum: |
|
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
The search will be limited to couriers that are able to arrive to the source point before allowed ETA. The service expects date and time with timezone specification. Example formats:
If timezone is not specified, the service assumes UTC+0 timezone. Example: |
|
robot_vins |
One of 2 types
The list of robot VINs to consider for this claim. If provided, only these robots will be considered for assignment Example
|
|
search_until |
One of 2 types
The search will stop after specified duration and fail. The service expects date and time with timezone specification. Example formats:
If timezone is not specified, the service assumes UTC+0 timezone. Example: |
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: |
|
id |
Type: string Example: |
|
route_points |
Type: ClaimPoint[] Example
|
|
status |
Type: ClaimStatus Enum: |
|
updated_at |
Type: string<date-time> Example: |
|
user_request_revision |
Type: string Example: |
|
version |
One of 2 types
Example: |
|
comment |
One of 2 types
Example: |
|
current_route_point_id |
One of 2 types
Example: |
|
eta |
One of 2 types
In minutes Example: |
|
external_id |
One of 2 types
Example: |
|
finished_at |
One of 2 types
Example: |
ClaimPointVisitStatus
Type: string
Enum: pending, on_the_way, arrived, in_exchange, completing, visited, skipping, skipped
ClaimPoint
|
Name |
Description |
|
address |
Type: ClaimPointAddress Example
|
|
id |
Type: string Example: |
|
type |
One of 2 types
Example: |
|
visit_order |
Type: integer |
|
visit_status |
One of 2 types
Example: |
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: Const: Enum: |
|
message |
Type: string Example: |
403 Forbidden
Forbidden
Body
application/json
{
"code": "FORBIDDEN",
"message": "example"
}
|
Name |
Description |
|
code |
Type: string Default: Const: Enum: |
|
message |
Type: string Example: |
422 Unprocessable Entity
Validation Error
Body
application/json
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}
|
Name |
Description |
|
detail |
Type: ValidationError[] Example
|
ValidationError
|
Name |
Description |
|
loc |
Type: arrayOne of 2 types
Example
|
|
msg |
Type: string Example: |
|
type |
Type: string Example: |
Example
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}