Adds a courier

  1. HTTP Request
  2. Path Parameters
  3. Request Body
    1. Representation
    2. Fields
  4. Responses
    1. Code 200
      1. Representation
      2. Fields
    2. Code 401
    3. Code 422
    4. Code 504

Adds information about couriers to the database.

HTTP Request

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

Path Parameters

company_id *

integer

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

company_id *

integer

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

Request Body

{
  "allow_manual_depot_detection": boolean,
  "allow_manual_order_detection": boolean,
  "allowed_courier_position_sources": [
    string
  ],
  "company_id": integer,
  "id": integer,
  "name": string,
  "number": string,
  "phone": string,
  "sms_enabled": boolean
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

allow_manual_depot_detection

boolean

Indicates whether manual depot visit detection allowed for courier.

allow_manual_order_detection

boolean

Indicates whether manual order visit detection allowed for courier.

allowed_courier_position_sources[]

array

Allowed courier position sources.

company_id

integer

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

id

integer

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

name

string

Name of the courier.

number *

string

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

phone

string

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

sms_enabled

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.

allow_manual_depot_detection

boolean

Indicates whether manual depot visit detection allowed for courier.

allow_manual_order_detection

boolean

Indicates whether manual order visit detection allowed for courier.

allowed_courier_position_sources[]

array

Allowed courier position sources.

company_id

integer

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

id

integer

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

name

string

Name of the courier.

number *

string

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

phone

string

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

sms_enabled

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

Code 200

Information about the courier has been added to the database.

{
  "allow_manual_depot_detection": boolean,
  "allow_manual_order_detection": boolean,
  "allowed_courier_position_sources": [
    string
  ],
  "company_id": integer,
  "id": integer,
  "name": string,
  "number": string,
  "phone": string,
  "sms_enabled": boolean
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

allow_manual_depot_detection

boolean

Indicates whether manual depot visit detection allowed for courier.

allow_manual_order_detection

boolean

Indicates whether manual order visit detection allowed for courier.

allowed_courier_position_sources[]

array

Allowed courier position sources.

company_id

integer

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

id

integer

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

name

string

Name of the courier.

number *

string

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

phone

string

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

sms_enabled

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.

allow_manual_depot_detection

boolean

Indicates whether manual depot visit detection allowed for courier.

allow_manual_order_detection

boolean

Indicates whether manual order visit detection allowed for courier.

allowed_courier_position_sources[]

array

Allowed courier position sources.

company_id

integer

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

id

integer

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

name

string

Name of the courier.

number *

string

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

phone

string

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

sms_enabled

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.

Code 401

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

Code 422

Incorrect input. The operation can't be performed.

Code 504

Error working with the API. Repeat the request.