Gets company's Sensors Feature by company ID

Gets company's Sensors Feature by company ID.

Request

GET

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

Path parameters

Name

Description

company_id*

Type: integer

The ID of the company.

Responses

200 OK

Success.

Body

application/json
{
    "alerts": [
        {
            "type": "range",
            "scope": "while_not_empty",
            "threshold_time": 0,
            "repeat": {
                "period": 0
            }
        }
    ]
}

Name

Description

alerts

Type: SensorAlert[]

Created sensor alerts.

SensorAlert

Name

Description

threshold_time*

Type: integer

Threshold time during which the sensor can exceed the threshold value (in seconds, default is taken from the company settings).

Max value: 604800

type*

Type: string

Type of the sensor-alert.

Enum: range, no_data

repeat

Type: SensorAlert_repeat

scope

Type: string

Alert's scope.

Default: while_not_empty

Enum: while_not_empty, all_route

SensorAlert_repeat

Name

Description

period*

Type: integer

Alert repetition period in seconds.

Min value: 1800

Max value: 604800

401 Unauthorized

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

403 Forbidden

Sensors feature is not available for the company.

422 Unprocessable Entity

Incorrect input.

504 Gateway Timeout

Server error during request processing.