Edits multiple couriers

Adds information about new couriers to the database or updates information about existing ones if their numbers match.

Request

POST

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

Path parameters

Name

Description

company_id*

Type: integer<int64>

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
    }
]

Courier[]

Courier

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<int64>

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.

Responses

200 OK

Information about couriers was registered or updated in the database.

401 Unauthorized

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

403 Forbidden

Error accessing the object. The user doesn't have the rights to access the object.

404 Not Found

Object search error. Object not found.

422 Unprocessable Entity

Incorrect input. The operation can't be performed.

504 Gateway Timeout

Error working with the API. Repeat the request.