Edits user

Updates user information by its ID.

Request

PATCH

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

Path parameters

Name

Description

company_id*

Type: integer<int64>

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

user_id*

Type: integer<int64>

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

Body

application/json
{
    "login": "string",
    "role": "admin"
}

Name

Description

login

Type: string

User's login.

role

Type: string

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

Enum: admin, manager, dispatcher, app

Responses

200 OK

Returns the updated object.

Body

application/json
{
    "id": 0,
    "login": "string",
    "role": "yandex_staff",
    "role_end_time": 0
}

Name

Description

id

Type: integer

User ID.

login

Type: string

User's login.

role

Type: string

Role of this user in the company. Possible values: yandex_staff, admin, manager, dispatcher, app.

Enum: yandex_staff, admin, manager, dispatcher, app

role_end_time

Type: integer<int64>

UNIX timestamp when the role gets revoked.

Min value: 0

401 Unauthorized

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

403 Forbidden

You do not have access to this object.

404 Not Found

No object found.

422 Unprocessable Entity

Incorrect input.

Previous