Skip to navigation

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 (permissions field), 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 :edit permission (and reimbursement_request:approve) needs its :view permission 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_idstringRequired
SalaryBox ID of the staff member.

Request

This endpoint expects an object.
permissionslist of enumsRequired

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.

messagestring
statusboolean
dataobject

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error