iRetail PRO store node 1.0.0-m1: employees
6 операций
← Вся документация · Источник: контракты, openapi/store-v1.yaml на коммите 8000474.
Справочники на английском — на языке контрактов, из которых они созданы.
← iRetail PRO store node 1.0.0-m1
Операции
GET
/v1/employees
Employees.
operationId
listEmployees · Право employee.read
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
limit
|
query | integer |
Page size, 1–200. |
after
|
query | string |
Cursor from the previous page. |
Ответы
-
200OKEmployeePage -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
POST
/v1/employees
Create an employee.
operationId
createEmployee · Право employee.edit
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
Approval-Token
|
header | string |
One-time approval from POST /v1/approvals for this operation's permission. |
Тело запроса обязательный
application/jsonEmployeeCreate
Ответы
GET
/v1/employees/{id}
One employee.
operationId
getEmployee · Право employee.read
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id обязательный
|
path | string (uuid) |
Id. |
Ответы
PATCH
/v1/employees/{id}
Change an employee.
Only an employee all of whose assignments the caller could have given (spec/RBAC.md, Bounded by one's own rights).
operationId
patchEmployee · Право employee.edit
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id обязательный
|
path | string (uuid) |
Id. |
If-Match
|
header | string |
The version the change is based on. |
Approval-Token
|
header | string |
One-time approval from POST /v1/approvals for this operation's permission. |
Тело запроса обязательный
application/jsonEmployeePatch
Ответы
POST
/v1/employees/{id}/assignments
Assign a role in a scope (no wider than one's own).
operationId
assignRole · Право role.assign
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id обязательный
|
path | string (uuid) |
Id. |
Approval-Token
|
header | string |
One-time approval from POST /v1/approvals for this operation's permission. |
Тело запроса обязательный
application/jsonAssignmentCreate
Ответы
-
201OKAssignment -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error -
404Error (spec/API.md).Error
DELETE
/v1/employees/{id}/assignments/{assignment_id}
Remove an assignment.
role.assign over the assignment's scope, and every assignment of the employee within the caller's reach (spec/RBAC.md, Bounded by one's own rights).
operationId
unassignRole · Право role.assign
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id обязательный
|
path | string (uuid) |
Id. |
assignment_id обязательный
|
path | string (uuid) |
Assignment id. |
Approval-Token
|
header | string |
One-time approval from POST /v1/approvals for this operation's permission. |
Ответы
Схемы
Error object
Every error response.
error обязательный
|
string |
Stable code, see spec/API.md. |
message обязательный
|
string |
English text for logs. |
details
|
object |
Assignment object
id обязательный
|
string (uuid) |
|
role обязательный
|
string |
|
scope обязательный
|
"network" | "store" | "workplace" |
|
store_id обязательный
|
string (uuid) | null |
|
workplace_id обязательный
|
string (uuid) | null |
AssignmentCreate object
role обязательный
|
string |
|
scope обязательный
|
"network" | "store" | "workplace" |
|
store_id
|
string (uuid) | null |
|
workplace_id
|
string (uuid) | null |
Employee object
id обязательный
|
string (uuid) |
|
login обязательный
|
string |
|
display_name обязательный
|
string |
|
language обязательный
|
string |
|
active обязательный
|
boolean |
|
assignments обязательный
|
array of Assignment |
|
version обязательный
|
integer (int64) |
EmployeeCreate object
login обязательный
|
string |
|
display_name обязательный
|
string |
|
language
|
string |
|
pin обязательный
|
string |
6 to 12 digits from 1.0 on (spec/RBAC.md, PINs). |
EmployeePatch object
display_name
|
string |
|
language
|
string |
|
active
|
boolean |
|
pin
|
string |
6 to 12 digits from 1.0 on (spec/RBAC.md, PINs). |
EmployeePage object
items обязательный
|
array of Employee |
|
next обязательный
|
string | null |