Adds a user

  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

Creates a new user in the company.

HTTP Request

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

Path Parameters

company_id *

integer

The ID of the company that is used in requests to the Track & Trace API.

company_id *

integer

The ID of the company that is used in requests to the Track & Trace API.

Request Body

{
  "login": string,
  "role": string
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

login *

string

User's login.

role

string

Role of this user. Possible values: admin, manager, dispatcher, app.

login *

string

User's login.

role

string

Role of this user. Possible values: admin, manager, dispatcher, app.

Responses

Code 200

Information about the user has been saved.

{
  "id": integer,
  "login": string,
  "role": string
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

id

integer

User ID.

login *

string

User's login.

role

string

Role of this user. Possible values: admin, manager, dispatcher, app.

id

integer

User ID.

login *

string

User's login.

role

string

Role of this user. Possible values: admin, manager, dispatcher, app.

Code 401

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

Code 422

Incorrect input.