Skip to main content

Get Incident Data V2

Written by Support

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

incidentId

integer

Incident ID

70

No

null

\d+

fromDate

date

Filter Incidents after this date

20240403T02:00:00

No

null

YYYYMMDDThh:mm:ss

toDate

date

Filter Incidents before this date

20240403T02:00:00

No

null

YYYYMMDDThh:mm:ss

Response Fields

Top-level fields returned per incident:

FIELD

TYPE

DESCRIPTION

id

integer

Incident ID

shortDescription

string

Short description / name of the incident

date

string

Incident date (dd-mm-YYYY HH:ii)

site

string

Site name

status

string

Status label (e.g. Pending Actions, Closed)

signoffStaff

string

Display name of the signoff staff member (empty if not signed off)

signoffTime

string

Signoff timestamp (empty if not signed off)

signoffComment

string

Signoff comment (empty if not signed off)

dateSubmitted

string|null

When the incident was submitted (dd-mm-YYYY HH:ii:ss); null for drafts

submittedBy

string|null

Display name of the person who submitted the incident (staff or employee). null if no submitter is recorded.

lastUpdated

string

Last update timestamp (dd-mm-YYYY HH:ii:ss)

dateEmployerNotified

string

Employer notified date (dd-mm-YYYY); empty if not reported

incidentShiftTime

string

Shift time bucket (e.g. In the first 25% of the shift)

incidentTypes

array

Incident types, each with sections and question/answer pairs

correctiveActions

array

List of corrective actions linked to the incident

contributingFactors

array

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": []
}
]
}
]
}
Did this answer your question?