Set Staff Permissions
Sets the permissions of a staff member on the Custom role. Shared rules: see Writing Data.
- This replaces everything: the staff member ends up with exactly the permissions you send, and
[]removes all. - Read the current set first from Fetch Single Staff (
permissionsfield), change it, and send the full list. - Only an Admin key can call this endpoint.
- The staff member must have the Custom role first. Use Set Staff Role to change it.
- Every
:editpermission (andreimbursement_request:approve) needs its:viewpermission in the same list. - Get the valid names, and what each one requires, from List Available Permissions (
GET /staff/permissions). They are also on the Staff Permissions page.
Authentication
AuthorizationApi-Key
Format: “Api-Key {api-key}”
Path parameters
salarybox_id
SalaryBox ID of the staff member.
Request
This endpoint expects an object.
permissions
Complete list of permissions the Custom-role staff member should have. [] removes all. Every :edit permission (and reimbursement_request:approve) also needs its :view permission in the list.
Response
The permissions were replaced. data.permissions is the resulting set, sorted alphabetically.
message
status
data
Errors
400
Bad Request Error
403
Forbidden Error
404
Not Found Error
