Courier's location

The method returns the coordinates, speed, and movement directions of the claim's courier.

Request

GET

b2b.taxi.yandex.net/b2b/cargo/integration/v2/claims/performer-position

Service URL

Query parameters

Name

Description

claim_id

Type: string

Claim ID received at the claim creation stage

Min length: 32

Max length: 64

Example: ``

Responses

200 OK

Information about the courier's location

Body

application/json
{
  "position": {
    "lat": -90,
    "lon": -180,
    "timestamp": 0,
    "accuracy": 0.5,
    "speed": 0.5,
    "direction": 0.5
  },
  "route_points": [
    {
      "id": 1,
      "type": "source",
      "visit_order": 1,
      "sharing_link": "example"
    }
  ]
}

Name

Description

position

Type: object

lat

Type: number

Latitude

Min value: -90

Max value: 90

lon

Type: number

Longitude

Min value: -180

Max value: 180

timestamp

Type: integer

GPS signal detection time, unix-time

accuracy

Type: number

GPS accuracy. Can't be added at the moment because the issue of measurement units hasn't been solved yet.

direction

Type: number

Direction. The angle from 0 to 360 degrees from the north direction, clockwise. 0 — north, 90 — east, 180 — south, 270 — west.

speed

Type: number

Average speed, m/s

Extended format of the courier's geolocation

Example
{
  "lat": -90,
  "lon": -180,
  "timestamp": 0,
  "accuracy": 0.5,
  "speed": 0.5,
  "direction": 0.5
}

route_points

Type: PointWithSharingLink[]

Route points with tracking links

Example
[
  {
    "id": 1,
    "type": "source",
    "visit_order": 1,
    "sharing_link": "example"
  }
]

PointType

Point type:

  • source: the point of departure where the courier picks up the item
  • destination: destination points where the courier delivers the items
  • return: item return point (added automatically and matches the point of departure by default, but a different point can also be selected)

Type: string

Enum: source, destination, return

Name

Description

id

Type: integer

Integer point ID (int64)

type

Type: PointType

Point type:

  • source: the point of departure where the courier picks up the item
  • destination: destination points where the courier delivers the items
  • return: item return point (added automatically and matches the point of departure by default, but a different point can also be selected)

Enum: source, destination, return

visit_order

Type: integer

The order in which the points are visited (numbering starts with 1) (int64)

sharing_link

Type: string

Route tracking link. Available only for destination points

Example: example

Example
{
  "id": 1,
  "type": "source",
  "visit_order": 1,
  "sharing_link": "example"
}

404 Not Found

Executor or courier's location not found

Body

application/json
{
  "code": "not_found",
  "message": "Claim not found"
}

Name

Description

code

Type: string

Error code

Const: not_found

Example: not_found

message

Type: string

Error description

Example: Claim not found

409 Conflict

Inactive claim or no information about the executor

Body

application/json
{
  "code": "inappropriate_status",
  "message": "Invalid action regarding the claim"
}

Name

Description

code

Type: string

Error code

Enum: unknown_performer_position, inappropriate_status

message

Type: string

Error description

Example: Invalid action regarding the claim

429 Too Many Requests

Too many requests

Body

application/json
{
  "code": "too_many_requests",
  "message": "Too many requests"
}

Name

Description

code

Type: string

Error code

Const: too_many_requests

Example: too_many_requests

message

Type: string

Error description

Example: Too many requests

No longer supported, please use an alternative and newer version.