GET [ incident/get-incident-data/{incidentId?} ]
Production Endpoint: https://app.complyflow.com.au/app/public/index.php/api/v2/incident/get-incident-data/{incidentId}
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/v2/incident/get-incident-data/{incidentId}When incidentId is not specified in the URL, then will return all list of incident data. Otherwise will return specific incident data
Overview
This endpoint is used to fetch all incident data or view specific incident data with v2 format.
Authentication instructions
Refer to the Authentication method for Authentication Methods (for Login and Logout).
Permissions Required
The user will required the permissions below:
API User
User is Staff
Users have View Incident Permission
Please also refer to the Permissions Overview guide.
Query parameters
FIELD | TYPE | DESCRIPTION | Example | REQUIRED | DEFAULT | PATTERN |
|
| Incident ID |
| No |
|
|
|
| Filter Incidents after this date |
| No |
|
|
|
| Filter Incidents before this date |
| No |
|
|
Response Fields
Top-level fields returned per incident:
FIELD | TYPE | DESCRIPTION |
|
| Incident ID |
|
| Short description / name of the incident |
|
| Incident date ( |
|
| Site name |
|
| Status label (e.g. |
|
| Display name of the signoff staff member (empty if not signed off) |
|
| Signoff timestamp (empty if not signed off) |
|
| Signoff comment (empty if not signed off) |
|
| When the incident was submitted ( |
|
| Display name of the person who submitted the incident (staff or employee). |
|
| Last update timestamp ( |
|
| Employer notified date ( |
|
| Shift time bucket (e.g. |
|
| Incident types, each with sections and question/answer pairs |
|
| List of corrective actions linked to the incident |
|
| List of contributing factors and their linked corrective actions |
Additional dynamic columns may also appear in the response, one per organisation-configured Incident Reporting Column (e.g. NA POLICE INVOLVED, NZ RISK MATRIX). The column name comes from the organisation configuration.
Request Example
To return all list of incident with filter fromDate and toDate parameter
curl --location 'https://app.complyflow.com.au/app/public/index.php/api/v2/incident/get-incident-data?toDate=20240410T02%3A00%3A00&fromDate=20240403T02%3A00%3A00' \
--header 'Authorization: [...]' \
--header 'Cookie: [...]'
To return a specific incident detail data
curl --location 'https://app.complyflow.com.au/app/public/index.php/api/v2/incident/get-incident-data/342' \
--header 'Authorization: [...]' \
--header 'Cookie: [...]'
Response Example
The API Request returns all or specific incident data based from incidentId parameter provided or not.
{
"token": "",
"data": [
{
"id": 342,
"shortDescription": "342",
"date": "02-01-2025 14:01",
"site": "projecta",
"status": "Pending Actions",
"signoffStaff": "",
"signoffTime": "",
"signoffComment": "",
"dateSubmitted": "01-01-2025 09:00:25",
"submittedBy": "John Doe",
"lastUpdated": "02-01-2025 18:03:51",
"dateEmployerNotified": "02-01-2025",
"incidentShiftTime": "In the first 25% of the shift",
"NA POLICE INVOLVED": "NA",
"NO POLICE INVOLVED": "asd",
"NQ POLICE INVOLVED": "",
"NZ POLICE INVOLVED": "NA",
"NZ RISK MATRIX": "NA",
"incidentTypes": [
{
"id": 35,
"name": "CType",
"sections": [
{
"id": 26,
"name": "Section Contributing Factor",
"questions": [
{
"question": "is this contributing factor",
"answer": {
"answer": "yes",
"answerTag": "",
"history": "02-01-2025 18:02:33"
}
},
{
"question": "What are you?",
"answer": []
}
]
},
{
"id": 24,
"name": "Section Corrective Action",
"questions": [
{
"question": "QuestionA?",
"answer": {
"answer": "",
"answerTag": "",
"history": "02-01-2025 18:02:36"
}
},
{
"question": "Dog, Are you a dog ?",
"answer": []
},
{
"question": "Upload File",
"answer": []
},
{
"question": "Are u a cat?",
"answer": {
"answer": "asd",
"answerTag": "",
"history": "02-01-2025 18:02:38"
}
},
{
"question": "What are you?",
"answer": []
}
]
}
]
}
],
"correctiveActions": [
{
"id": 17,
"description": "123",
"assignedTo": {
"staffId": 692,
"staffName": "wr er"
},
"createdBy": {
"staffId": 692,
"staffName": "wr er"
},
"dueDate": "01-02-2025",
"lastUpdated": "02-01-2025 18:02:48",
"lastUpdatedBy": "wr er",
"status": "Open"
}
],
"contributingFactors": [
{
"id": 13,
"description": "yes",
"origin": "is this contributing factor",
"correctiveActions": []
}
]
}
]
}