iRetail PRO store node 1.0.0-m1: employees
6 operations
← All documentation · Source: contracts openapi/store-v1.yaml at 8000474.
← iRetail PRO store node 1.0.0-m1
Operations
GET
/v1/employees
Employees.
operationId
listEmployees · Permission employee.read
Parameters
| Name | In | Type | Description |
|---|---|---|---|
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. |
Responses
-
200OKEmployeePage -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
POST
/v1/employees
Create an employee.
operationId
createEmployee · Permission employee.edit
Parameters
| Name | In | Type | Description |
|---|---|---|---|
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. |
Request body required
application/jsonEmployeeCreate
Responses
GET
/v1/employees/{id}
One employee.
operationId
getEmployee · Permission employee.read
Parameters
| Name | In | Type | Description |
|---|---|---|---|
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 required
|
path | string (uuid) |
Id. |
Responses
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 · Permission employee.edit
Parameters
| Name | In | Type | Description |
|---|---|---|---|
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 required
|
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. |
Request body required
application/jsonEmployeePatch
Responses
POST
/v1/employees/{id}/assignments
Assign a role in a scope (no wider than one's own).
operationId
assignRole · Permission role.assign
Parameters
| Name | In | Type | Description |
|---|---|---|---|
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 required
|
path | string (uuid) |
Id. |
Approval-Token
|
header | string |
One-time approval from POST /v1/approvals for this operation's permission. |
Request body required
application/jsonAssignmentCreate
Responses
-
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 · Permission role.assign
Parameters
| Name | In | Type | Description |
|---|---|---|---|
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 required
|
path | string (uuid) |
Id. |
assignment_id required
|
path | string (uuid) |
Assignment id. |
Approval-Token
|
header | string |
One-time approval from POST /v1/approvals for this operation's permission. |
Responses
Schemas
Error object
Every error response.
error required
|
string |
Stable code, see spec/API.md. |
message required
|
string |
English text for logs. |
details
|
object |
Assignment object
id required
|
string (uuid) |
|
role required
|
string |
|
scope required
|
"network" | "store" | "workplace" |
|
store_id required
|
string (uuid) | null |
|
workplace_id required
|
string (uuid) | null |
AssignmentCreate object
role required
|
string |
|
scope required
|
"network" | "store" | "workplace" |
|
store_id
|
string (uuid) | null |
|
workplace_id
|
string (uuid) | null |
Employee object
id required
|
string (uuid) |
|
login required
|
string |
|
display_name required
|
string |
|
language required
|
string |
|
active required
|
boolean |
|
assignments required
|
array of Assignment |
|
version required
|
integer (int64) |
EmployeeCreate object
login required
|
string |
|
display_name required
|
string |
|
language
|
string |
|
pin required
|
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 required
|
array of Employee |
|
next required
|
string | null |