Staff API

Manage staff members, roles, permissions, and time tracking

17 endpoints

Base URL:https://api.nexapay.com/v1
MethodPathDescription
GET/staffList all staff members
POST/staffCreate new staff member
GET/staff/{staff_id}Get staff details
PUT/staff/{staff_id}Update staff information
DELETE/staff/{staff_id}Delete staff member
GET/rolesList all roles
POST/rolesCreate new role
GET/roles/{role_id}Get role details
PUT/roles/{role_id}Update role
DELETE/roles/{role_id}Delete role
PUT/staff/{staff_id}/roleAssign role to staff
GET/permissionsList all permissions
POST/staff/{staff_id}/clock-inClock in staff member
POST/staff/{staff_id}/clock-outClock out staff member
GET/staff/{staff_id}/timesheetsGet staff timesheets
GET/timesheetsGet all timesheets
PUT/timesheets/{timesheet_id}Update timesheet entry

Detailed Examples

POST/staff

Request Body

{
  "first_name": "John",
  "last_name": "Smith",
  "email": "john.smith@mycoffeeshop.com",
  "phone": "+1-555-234-5678",
  "role_id": "role_cashier",
  "store_ids": ["store_abc123"],
  "pin": "1234",
  "hourly_rate": 15.00,
  "hire_date": "2024-01-15"
}

Response

{
  "success": true,
  "data": {
    "id": "staff_xyz789",
    "first_name": "John",
    "last_name": "Smith",
    "email": "john.smith@mycoffeeshop.com",
    "role": {
      "id": "role_cashier",
      "name": "Cashier",
      "permissions": ["process_sales", "view_products"]
    },
    "status": "active",
    "created_at": "2024-01-15T10:00:00Z"
  }
}