Staff Users Management
GET /api/v1/staff/users
Get Staff Users
Авторизация: Bearer Token
Query параметры:
| Параметр | Тип | По умолчанию | Описание |
|---|---|---|---|
| include_inactive | Include Inactive | False |
Response 200: Successful Response
array[StaffUserListResponse]
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
| id | Id | нет | |
| нет | |||
| first_name | First Name | нет | |
| last_name | Last Name | нет | |
| full_name | Full Name | нет | |
| is_active | Is Active | нет | |
| is_superuser | Is Superuser | нет | |
| must_change_password | Must Change Password | нет | |
| permissions | array[string] | нет | |
| failed_login_attempts | Failed Login Attempts | нет | |
| locked_until | Locked Until | нет | |
| created_at | Created At | нет | |
| last_login_at | Last Login At | нет | |
| can_view_monitoring | Can View Monitoring | нет | |
| can_view_stats_callcenter | Can View Stats Callcenter | нет | |
| can_view_stats_terminals | Can View Stats Terminals | нет | |
| can_view_stats_operators | Can View Stats Operators | нет | |
| can_manage_schedules | Can Manage Schedules | нет | |
| can_view_billing | Can View Billing | нет |
Ошибки:
| Код | Описание |
|---|---|
| 422 | Validation Error |
POST /api/v1/staff/users
Create Staff User Endpoint
Авторизация: Bearer Token
Request Body:
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
| да | Email сотрудника | ||
| first_name | First Name | нет | Имя |
| last_name | Last Name | нет | Фамилия |
| is_superuser | Is Superuser | нет | Суперпользователь (все права) |
| permissions | array[string] | нет | Список прав доступа |
Response 201: Successful Response
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
| user | object | нет | Ответ с данными сотрудника |
| temporary_password | Temporary Password | нет | Временный пароль |
Ошибки:
| Код | Описание |
|---|---|
| 422 | Validation Error |
GET /api/v1/staff/users/{user_id}
Get Staff User
Авторизация: Bearer Token
Path параметры:
| Параметр | Тип | Описание |
|---|---|---|
| user_id | User Id |
Response 200: Successful Response
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
| id | Id | нет | |
| нет | |||
| first_name | First Name | нет | |
| last_name | Last Name | нет | |
| full_name | Full Name | нет | |
| is_active | Is Active | нет | |
| is_superuser | Is Superuser | нет | |
| must_change_password | Must Change Password | нет | |
| permissions | array[string] | нет | Список прав доступа |
| created_at | Created At | нет | |
| last_login_at | Last Login At | нет | |
| can_view_monitoring | Can View Monitoring | нет | |
| can_view_stats_callcenter | Can View Stats Callcenter | нет | |
| can_view_stats_terminals | Can View Stats Terminals | нет | |
| can_view_stats_operators | Can View Stats Operators | нет | |
| can_manage_schedules | Can Manage Schedules | нет | |
| can_view_billing | Can View Billing | нет |
Ошибки:
| Код | Описание |
|---|---|
| 422 | Validation Error |
PATCH /api/v1/staff/users/{user_id}
Update Staff User Endpoint
Авторизация: Bearer Token
Path параметры:
| Параметр | Тип | Описание |
|---|---|---|
| user_id | User Id |
Request Body:
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
| нет | |||
| first_name | First Name | нет | |
| last_name | Last Name | нет | |
| is_active | Is Active | нет | |
| is_superuser | Is Superuser | нет | |
| permissions | Permissions | нет |
Response 200: Successful Response
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
| id | Id | нет | |
| нет | |||
| first_name | First Name | нет | |
| last_name | Last Name | нет | |
| full_name | Full Name | нет | |
| is_active | Is Active | нет | |
| is_superuser | Is Superuser | нет | |
| must_change_password | Must Change Password | нет | |
| permissions | array[string] | нет | Список прав доступа |
| created_at | Created At | нет | |
| last_login_at | Last Login At | нет | |
| can_view_monitoring | Can View Monitoring | нет | |
| can_view_stats_callcenter | Can View Stats Callcenter | нет | |
| can_view_stats_terminals | Can View Stats Terminals | нет | |
| can_view_stats_operators | Can View Stats Operators | нет | |
| can_manage_schedules | Can Manage Schedules | нет | |
| can_view_billing | Can View Billing | нет |
Ошибки:
| Код | Описание |
|---|---|
| 422 | Validation Error |
DELETE /api/v1/staff/users/{user_id}
Delete Staff User Endpoint
Авторизация: Bearer Token
Path параметры:
| Параметр | Тип | Описание |
|---|---|---|
| user_id | User Id |
Response 200: Successful Response
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
| message | Message | нет |
Ошибки:
| Код | Описание |
|---|---|
| 422 | Validation Error |
POST /api/v1/staff/users/{user_id}/reset-password
Reset Staff Password
Авторизация: Bearer Token
Path параметры:
| Параметр | Тип | Описание |
|---|---|---|
| user_id | User Id |
Response 200: Successful Response
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
| user | object | нет | Ответ с данными сотрудника |
| temporary_password | Temporary Password | нет | Временный пароль |
Ошибки:
| Код | Описание |
|---|---|
| 422 | Validation Error |
POST /api/v1/staff/users/{user_id}/unlock
Unlock Staff User
Авторизация: Bearer Token
Path параметры:
| Параметр | Тип | Описание |
|---|---|---|
| user_id | User Id |
Response 200: Successful Response
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
| message | Message | нет |
Ошибки:
| Код | Описание |
|---|---|
| 422 | Validation Error |
GET /api/v1/staff/users/permissions/list
Get Available Permissions
Авторизация: Bearer Token
Response 200: Successful Response
array[string]