Adds a courier

Adds information about couriers to the database.

Request

POST

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

Path parameters

Name

Description

company_id*

Type: integer

Company ID used in requests to the Track & Trace API.

Body

application/json
{
    "id": 0,
    "company_id": 0,
    "name": "string",
    "number": "string",
    "phone": "string",
    "sms_enabled": false,
    "allowed_courier_position_sources": [
        "app",
        "gps_tracker"
    ],
    "allow_manual_order_detection": false,
    "allow_manual_depot_detection": false
}

Name

Description

number*

Type: string

Mobile employee number that matches the number in the delivery company's system.

allow_manual_depot_detection

Type: boolean

Indicates whether manual depot visit detection allowed for courier.

allow_manual_order_detection

Type: boolean

Indicates whether manual order visit detection allowed for courier.

allowed_courier_position_sources

Type: string[]

Allowed courier position sources.

Enum: app, gps_tracker, s2s_api, yanavi

Example: app,gps_tracker

company_id

Type: integer

Company ID used in requests to the Track & Trace API.

id

Type: integer

Mobile employee ID used in requests to the Track & Trace API.

name

Type: string

Name of the courier.

Max length: 255

phone

Type: string

Mobile employee's phone number in +7XXXXXXXXXX format. You can only enter one phone number for each courier.

sms_enabled

Type: boolean

Indicates whether clients are notified via SMS. The true value means that an SMS notification is sent for orders delivered by this mobile employee.

Responses

200 OK

Information about the courier has been added to the database.

Body

application/json
{
    "id": 0,
    "company_id": 0,
    "name": "string",
    "number": "string",
    "phone": "string",
    "sms_enabled": false,
    "allowed_courier_position_sources": [
        "app",
        "gps_tracker"
    ],
    "allow_manual_order_detection": false,
    "allow_manual_depot_detection": false
}

Name

Description

allow_manual_depot_detection

Type: boolean

Indicates whether manual depot visit detection allowed for courier.

allow_manual_order_detection

Type: boolean

Indicates whether manual order visit detection allowed for courier.

allowed_courier_position_sources

Type: string[]

Allowed courier position sources.

Enum: app, gps_tracker, s2s_api, yanavi

Example: app,gps_tracker

company_id

Type: integer

Company ID used in requests to the Track & Trace API.

id

Type: integer

Mobile employee ID used in requests to the Track & Trace API.

name

Type: string

Name of the courier.

Max length: 255

number

Type: string

Mobile employee number that matches the number in the delivery company's system.

phone

Type: string

Mobile employee's phone number in +7XXXXXXXXXX format. You can only enter one phone number for each courier.

sms_enabled

Type: boolean

Indicates whether clients are notified via SMS. The true value means that an SMS notification is sent for orders delivered by this mobile employee.

401 Unauthorized

Deprecated

Authorization error. Make sure that the request header contains the correct OAuth token.

422 Unprocessable Entity

Deprecated

Incorrect input. The operation can't be performed.

504 Gateway Timeout

Deprecated

Error working with the API. Repeat the request.