Skip to navigation

Set Staff Role

Changes the role of a staff member. Shared rules: see Writing Data.

  • Only an Admin key can call this endpoint.
  • role must be one of Employee, Branch Admin, Attendance Manager, Advanced Attendance Manager or Custom. Admin is not accepted, and an Admin’s role cannot be changed.
  • Custom needs Custom Permissions turned on in the SalaryBox app’s settings. After setting it, use Set Staff Permissions.
  • Permissions saved for the Custom role are kept when the role changes, and apply again if the role is set back to Custom.

Authentication

AuthorizationApi-Key

Format: “Api-Key {api-key}”

Path parameters

salarybox_idstringRequired
SalaryBox ID of the staff member.

Request

This endpoint expects an object.
roleenumRequired

The new role (case-sensitive).

  • Employee: can mark their own attendance.
  • Branch Admin: can mark attendance and process salary of staff in their branch.
  • Attendance Manager: can mark today’s attendance of all staff.
  • Advanced Attendance Manager: can mark all days’ attendance of all staff.
  • Custom: has the permissions an admin chooses (see Set Staff Permissions).
Allowed values:

Response

The role was set. Sending the role the staff member already has changes nothing and also returns 200.

messagestring
statusboolean
dataobject

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error