> ## Client identification
>
> Requests to this API should include a `Client-Platform` header alongside
> `Authorization`, identifying the application, tool, or model making the
> request. This is used for integration support and analytics.
>
> Use your model or tool name, for example `claude-code` or `chatgpt`.
>
> Example:
>
> ```bash
> curl https://api.salaryboxapp.com/... \
>   -H "Authorization: Api-Key <api-key>" \
>   -H "Client-Platform: claude-code"
> ```

# Staff Permissions

Staff with the **Custom** role can only do what their permissions allow. These are
the same permissions an admin ticks in the SalaryBox app's role grid.

**List Available Permissions** (`GET /customer/v1/staff/permissions`) returns this
list live, with each permission's section and what it also needs. Integrations
should read it instead of hard-coding the table below.

Use these names with (shared rules for all write endpoints are on [Writing Data](/writing-data)):

* **Set Staff Permissions** (`PUT /customer/v1/staff/{salarybox_id}/permissions`) to
  give a Custom-role staff member exactly this set.
* **Set Staff Role** (`PUT /customer/v1/staff/{salarybox_id}/role`) to give a staff
  member the Custom role first.
* **Fetch Single Staff** (`GET /customer/v1/staff/fetch-employee`), whose
  `permissions` field shows the set a Custom-role staff member has now.

## Rules

* Names are case-sensitive and must be written exactly as below. Any other name is
  refused with `Unknown permission 'x'.`
* An `:edit` permission needs its `:view` permission in the same request, and
  `reimbursement_request:approve` needs `reimbursement_request:view`. Otherwise the
  request is refused, e.g. `'staff_details:edit' also needs 'staff_details:view'.`
* Setting permissions replaces the whole set, so send every permission the staff
  member should keep.

## All permissions (36)

| Area                     | Section in the app           | Permission                         | Also needs                         |
| ------------------------ | ---------------------------- | ---------------------------------- | ---------------------------------- |
| Attendance Data          | Staff Attendance Records     | `attendance_record:view`           |                                    |
| Attendance Data          | Staff Attendance Records     | `attendance_record:edit`           | `attendance_record:view`           |
| Attendance Data          | Attendance Reports           | `attendance_report:view`           |                                    |
| Attendance Data          | Attendance Reports           | `attendance_report:edit`           | `attendance_report:view`           |
| Attendance Settings      | Work Timings & Roster        | `work_schedule:view`               |                                    |
| Attendance Settings      | Work Timings & Roster        | `work_schedule:edit`               | `work_schedule:view`               |
| Attendance Settings      | Attendance Modes             | `attendance_mode:view`             |                                    |
| Attendance Settings      | Attendance Modes             | `attendance_mode:edit`             | `attendance_mode:view`             |
| Attendance Settings      | Automation Rules             | `attendance_automation_rule:view`  |                                    |
| Attendance Settings      | Automation Rules             | `attendance_automation_rule:edit`  | `attendance_automation_rule:view`  |
| Leave Management         | Leave Requests               | `leave_request:approve`            |                                    |
| Leave Management         | Balances & Policies          | `leave_balance_policy:view`        |                                    |
| Leave Management         | Balances & Policies          | `leave_balance_policy:edit`        | `leave_balance_policy:view`        |
| Reimbursement Management | Reimbursement Requests       | `reimbursement_request:view`       |                                    |
| Reimbursement Management | Reimbursement Requests       | `reimbursement_request:edit`       | `reimbursement_request:view`       |
| Reimbursement Management | Reimbursement Requests       | `reimbursement_request:approve`    | `reimbursement_request:view`       |
| Staff Management         | Staff Details                | `staff_details:view`               |                                    |
| Staff Management         | Staff Details                | `staff_details:edit`               | `staff_details:view`               |
| Staff Management         | Documents                    | `staff_documents:view`             |                                    |
| Staff Management         | Documents                    | `staff_documents:edit`             | `staff_documents:view`             |
| Staff Management         | Additional Settings          | `additional_settings:view`         |                                    |
| Staff Management         | Additional Settings          | `additional_settings:edit`         | `additional_settings:view`         |
| Staff Management         | Enrol Face                   | `face_enrolment:view`              |                                    |
| Staff Management         | Enrol Face                   | `face_enrolment:edit`              | `face_enrolment:view`              |
| Salary Details           | CTC Details                  | `staff_salary:view`                |                                    |
| Salary Details           | CTC Details                  | `staff_salary:edit`                | `staff_salary:view`                |
| Salary Details           | Penalty & Overtime           | `penalty_overtime:view`            |                                    |
| Salary Details           | Penalty & Overtime           | `penalty_overtime:edit`            | `penalty_overtime:view`            |
| Salary Details           | Tax Declarations             | `tax_declaration:view`             |                                    |
| Salary Details           | Tax Declarations             | `tax_declaration:edit`             | `tax_declaration:view`             |
| Salary Details           | Bank Account                 | `bank_account:view`                |                                    |
| Salary Details           | Bank Account                 | `bank_account:edit`                | `bank_account:view`                |
| Approval Flows           | Leave Approval Flows         | `leave_approval_flow:view`         |                                    |
| Approval Flows           | Leave Approval Flows         | `leave_approval_flow:edit`         | `leave_approval_flow:view`         |
| Approval Flows           | Reimbursement Approval Flows | `reimbursement_approval_flow:view` |                                    |
| Approval Flows           | Reimbursement Approval Flows | `reimbursement_approval_flow:edit` | `reimbursement_approval_flow:view` |