Set Staff Role
Changes the role of a staff member. Shared rules: see Writing Data.
- Only an Admin key can call this endpoint.
rolemust be one ofEmployee,Branch Admin,Attendance Manager,Advanced Attendance ManagerorCustom.Adminis not accepted, and an Admin’s role cannot be changed.Customneeds 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_id
SalaryBox ID of the staff member.
Request
This endpoint expects an object.
role
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.
message
status
data
Errors
400
Bad Request Error
403
Forbidden Error
404
Not Found Error
