Skip to main content

Staff Category Compliance Report

Written by Support

Overview

Two new API endpoints for retrieving staff category compliance data — document and training status per staff member, by staff category. Designed for Power BI integration.

Authentication instructions

Refer to the Authentication method for Authentication Methods (for Login and Logout).

Endpoint 1: List Staff Categories

GET /api/acu/staff-categories

Parameters: None

Response:

{
"token": "refreshed_jwt_token",
"data": [
{ "id": 12, "name": "Corodek (ASC)" },
{ "id": 15, "name": "Site Supervisors" }
]
}

Endpoint 2: Category Compliance Report

GET /api/acu/category-compliance-report?category_id={id}

Query Parameters:

Param

Type

Required

Default

Description

category_id

integer

Yes

Staff category ID (must belong to your organisation)

page

integer

No

1

Page number

per_page

integer

No

50

Records per page (max: 100)

Response:

{
"token": "refreshed_jwt_token",
"data": {
"category": {
"id": 12,
"name": "Corodek (ASC)"
},
"required_documents": [
{ "id": 45, "name": "SOP-005 - Corodek - Review and Sign Off" },
{ "id": 46, "name": "Induction Certificate" }
],
"required_training": [
{ "id": 8, "name": "EWP Operator Certification", "expiry_months": 24 }
],
"pagination": {
"total": 84,
"per_page": 50,
"current_page": 1,
"last_page": 2
},
"members": [
{
"id": 1024,
"name": "Jane Smith",
"email": "jane.smith@example.com",
"overall_status": "non_compliant",
"documents": [
{
"document_category_id": 45,
"document_category_name": "SOP-005 - Corodek - Review and Sign Off",
"status": "compliant",
"expiry_date": "2026-12-31",
"approved_date": "2025-01-15",
"approver": "John Admin"
},
{
"document_category_id": 46,
"document_category_name": "Induction Certificate",
"status": "missing",
"expiry_date": null,
"approved_date": null,
"approver": null
}
],
"training": [
{
"training_course_id": 8,
"training_course_name": "EWP Operator Certification",
"status": "expiring_soon",
"completed_date": "2024-04-01",
"expiry_date": "2026-04-01"
}
]
}
]
}
}

Status Values

Status

Meaning

compliant

Valid, approved/passed, not expired

expiring_soon

Valid but expires within 30 days

expired

Past expiry date

pending_approval

Uploaded/completed but awaiting approval (documents only)

missing

No record uploaded or completed

overall_status: compliant only if ALL documents and training are compliant or expiring_soon. Otherwise non_compliant.

Error Responses

Scenario

Response

Missing/invalid category_id

{ "status": false, "error": "...", "error_code": 1 }

Category not in your org

{ "status": false, "error": "The specified staff category does not exist in your organisation.", "error_code": 2 }

No auth token / invalid token

401 Unauthorized

No API access

{ "status": false, "error": "Access denied", "error_code": 20 }

Usage Pattern (Power BI)

  1. Call GET /api/acu/staff-categories to get all category IDs

  2. For each category, call GET /api/acu/category-compliance-report?category_id={id}

  3. Paginate through members with &page=2, &page=3, etc.

Notes

  • All results are scoped to the authenticated user's organisation via JWT token

  • Soft-deleted staff are excluded

  • Inactive (disabled) staff are excluded

  • Documents with no expiry date are never shown as expired

  • expiry_months on training courses may be null if the course has a non-standard expiry period

Did this answer your question?