Adds a rented 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 403
    4. Code 422
    5. Code 504

Adds rented courier information to the database.

HTTP Request

POST https://courier.yandex.ru/api/v1/companies/{company_id}/rented-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

{
  "order_id": string,
  "provider": string
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

order_id *

string

Order identifier from provider.

provider *

string

Identifier of provider. Allowed values: yandex_taxi_cargo.

order_id *

string

Order identifier from provider.

provider *

string

Identifier of provider. Allowed values: yandex_taxi_cargo.

Responses

Code 200

The rented courier information was registered in the database.

{
  "company_id": integer,
  "created_at": string,
  "id": string,
  "order_id": string,
  "provider": string
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

company_id

integer

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

created_at

string

Date and time of rented courier object creation.

id

string

Rented courier ID. Used in Route objects for thrid-party tracking.

order_id *

string

Order identifier from provider.

provider *

string

Identifier of provider. Possible values: yandex_taxi_cargo.

company_id

integer

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

created_at

string

Date and time of rented courier object creation.

id

string

Rented courier ID. Used in Route objects for thrid-party tracking.

order_id *

string

Order identifier from provider.

provider *

string

Identifier of provider. Possible values: yandex_taxi_cargo.

Code 401

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

Code 403

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

Code 422

Incorrect input. The operation can't be performed.

Code 504

Error working with the API. Repeat the request.