Skip to main content

Get Staff Training History

Written by Support

GET [ staff/{id}/training ]

Production Endpoint: https://app.complyflow.com.au/app/public/index.php/api/v1/staff/{id}/training
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/v1/staff/{id}/training

Overview

This endpoint returns the complete training history (online + offline) for a specific staff member in the current organisation. It returns attendee-level records — use this endpoint for individual profile views and compliance verification.

Authentication instructions

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

Permissions Required

The user requires the permissions below:

  • API User

  • User is Staff

  • Users have View Training Permission

Please also refer to the Permissions Overview guide.

Path parameters

FIELD

TYPE

DESCRIPTION

EXAMPLE

REQUIRED

id

integer

Staff member ID

123

Yes

Query parameters

FIELD

TYPE

DESCRIPTION

EXAMPLE

REQUIRED

DEFAULT

PATTERN

type

string

Filter by training type

offline

No

all

all | online | offline

status

string

Filter by status

completed

No

null

proposed | confirmed | completed | cancelled | upcoming

project_id

integer

Filter by project/site ID

10

No

null

\d+

label_id

integer

Filter by training label ID

5

No

null

\d+

date_from

string

Start date filter

2025-01-01

No

null

YYYY-MM-DD

date_to

string

End date filter

2025-06-30

No

null

YYYY-MM-DD

page

integer

Page number

1

No

1

min: 1

per_page

integer

Records per page

50

No

50

min: 1, max: 100

Request Example

curl --location 'https://test.complyflow.com.au/app/public/index.php/api/v1/staff/123/training?type=all&page=1' \
--header 'Authorization: Bearer [...]'

Response Example

The API request returns the unified training history for the specified staff member. Pagination metadata is returned under the meta key.

{
"data": [
{
"id": 9012,
"type": "offline",
"training_name": "Emergency Response Drill",
"training_type": "session",
"completed_at": "2025-06-15T00:00:00+00:00",
"status": "completed",
"result": "attended",
"valid_until": null,
"person": {
"id": 123,
"type": "staff",
"name": "Jane Smith",
"company": null
},
"projects": ["Melbourne Rail Hub"],
"labels": ["Safety", "Emergency"],
"session": {
"id": 456,
"name": "Emergency Response Drill",
"venue": "Training Room A",
"checked_in_at": "2025-06-15T08:45:00+00:00",
"check_in_method": "qr_code"
}
},
{
"id": 3456,
"type": "online",
"training_name": "WHS Fundamentals",
"training_type": "course",
"completed_at": "2025-05-20T00:00:00+00:00",
"status": "completed",
"result": "passed",
"valid_until": "2026-05-20",
"person": {
"id": 123,
"type": "staff",
"name": "Jane Smith",
"company": null
},
"projects": [],
"labels": ["Mandatory"],
"session": null
}
],
"meta": {
"current_page": 1,
"per_page": 50,
"total": 15,
"total_pages": 1
}
}

Note: For offline records, completed_at is the first session day and session holds the check-in detail. For online records, session is null and valid_until holds the course expiry date. Result values: online — passed / failed / expired; offline — attended / not_attended.

Error Responses

HTTP Code

Scenario

Body

401

Missing JWT token

{"error": "token_not_provided"}

401

Invalid or malformed JWT

{"error": "token_invalid"}

401

Expired JWT token

{"error": "token_expired"}

404

Staff not found or not in your organisation

{"error": "Staff not found or access denied"}

429

Rate limit exceeded (60 requests/minute per user)

{"error": "Too many requests", "message": "Rate limit exceeded..."}

Did this answer your question?