Set sensors to the route. Rewrite existing sensors.

Set sensors to the route. Rewrite existing sensors.

Request

PUT

https://courier.yandex.ru/api/v1/companies/{company_id}/routes/{route_id}/sensors

Path parameters

Name

Description

company_id*

Type: integer

The ID of the company.

route_id*

Type: integer

Route ID that is used in requests to the Track & Trace API.

Body

application/json
[
    {
        "sensor_number": "string",
        "sensor_range_id": "string",
        "sensor_name": "string"
    }
]

RouteSensorsRequestList[]

RouteSensorsRequestList

Name

Description

sensor_name*

Type: string

Display name for the sensor on this route.

Min length: 1

Max length: 80

sensor_number*

Type: string

Number of the sensor configured on the gps-tracker device.

Min length: 1

Max length: 80

Pattern: ^[-_a-zA-Z0-9]+$

sensor_range_id

Type: string

Id of the sensor-range.

Responses

200 OK

Success.

400 Bad Request

Invalid parameters were passed.

401 Unauthorized

Authorization failed. Send the correct OAuth token in the authorization header.

403 Forbidden

You do not have access to this object.

422 Unprocessable Entity

Incorrect input.

504 Gateway Timeout

Server error during request processing.