Skip to main content

Get Worker Training History

Written by Support

GET [ Worker/{id}/training ]

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

Overview

This endpoint returns the complete training history (online + offline) for a specific employee (Contractor worker) assigned to the current organisation. It returns attendee-level records, identical in format to the Staff training endpoint, with the Contractor company name included in the person object.

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

Worker ID (must be numeric)

456

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+

company_id

integer

Filter by contractor/company ID

789

No

null

\d+

date_from

string

Start date filter

2025-01-01

No

null

YYYY-MM-DD

date_to

string

End date filter. Must be >= date_from

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/employees/456/training?status=completed' \
--header 'Authorization: Bearer [...]'

Response Example

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

{
"data": [
{
"id": 7890,
"type": "offline",
"training_name": "Forklift Operation Refresher",
"training_type": "session",
"completed_at": "2025-07-01T00:00:00+00:00",
"status": "completed",
"result": "attended",
"valid_until": null,
"person": {
"id": 456,
"type": "employee",
"name": "John Doe",
"company": "ABC Contractors Pty Ltd"
},
"projects": ["Sydney Metro West"],
"labels": ["Plant Operations"],
"session": {
"id": 789,
"name": "Forklift Operation Refresher",
"venue": "Warehouse B",
"checked_in_at": "2025-07-01T07:30:00+00:00",
"check_in_method": "manual"
}
}
],
"meta": {
"current_page": 1,
"per_page": 50,
"total": 8,
"total_pages": 1
}
}

Note: The Worker must be assigned to the authenticated user’s organisation via the Contractor relationship chain (Worker → OrganisationContractorWorker → OrganisationContractor → Organisation). If the Worker exists but is not linked to your organisation, a 404 is returned. The company field in the person object holds the Contractor company name.

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"}

403

User not authorised to access Worker training

{"error": "You are not authorized to access employee training records."}

404

Worker not found or not in your organisation

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

422

Validation error

{"date_from": ["The date from does not match the format Y-m-d."]}

429

Rate limit exceeded (60 requests/minute per user)

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

Did this answer your question?