Skip to main content

Get Incident Data V3

Written by Support

Introduction

The Get Incident Data V3 API returns incident data with the same per-incident shape as the V2 endpoint, but adds paginated list responses, auto-defaulting date filters, a 2-year maximum date range, and accepts incidentId as a query parameter instead of a path parameter.

When incidentId is not specified in the URL, then will return all list of incident data. Otherwise will return specific incident data

GET [ incident/get-incident-data ]

Production Endpoint: https://app.complyflow.com.au/app/public/index.php/api/v3/incident/get-incident-data
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/v3/incident/get-incident-data

V3 differs from V2: incidentId is a query parameter (not a path param), responses are paginated when no incidentId is supplied, dates auto-default when omitted, and the maximum date range is 2 years.

Overview

Returns incident data with the same per-incident shape as V2, but adds:

  • Pagination for list responses (page, per_page, returns a pagination metadata block)

  • Auto-defaulting date filters — if neither fromDate nor toDate is supplied, the API returns the last 6 months

  • Date range cap of 2 years — requests with a span greater than 730 days are rejected

  • incidentId as a query parameter — supplying it returns a single incident (no pagination)

Authentication instructions

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

Permissions Required

The user will require 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

incidentId

integer

Return a single incident. When supplied, the response is not paginated.

342

No

null

fromDate

date

Filter incidents after this date. If both fromDate and toDate are omitted, the API defaults to the last 6 months.

20250101T00:00:00

No

now − 6 months (when both dates omitted)

toDate

date

Filter incidents before this date.

20250630T23:59:59

No

now (when both dates omitted)

page

integer

Page number for paginated responses (ignored when incidentId is supplied).

2

No

1

per_page

integer

Page size for paginated responses. Maximum 1000.

200

No

500

Date format pattern: YYYYMMDDThh:mm:ss. fromDate must be before toDate. The maximum allowed range is 730 days (2 years); requests exceeding this return a validation error.

Response Fields

Each incident in data uses the same shape as the V2 endpoint — including:

FIELD

TYPE

DESCRIPTION

id, shortDescription, date, site, status

various

Identifying and status fields (see V2)

signoffStaff, signoffTime, signoffComment

string

Signoff metadata (empty when not signed off)

dateSubmitted

string|null

Submission timestamp; 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, dateEmployerNotified, incidentShiftTime

string

Update and notification metadata

incidentTypes, correctiveActions, contributingFactors

array

Nested structures (see V2 page for full shape)

Additional dynamic columns may also appear in the response, one per organisation-configured Incident Reporting Column.

Pagination metadata

When the response is paginated (no incidentId supplied), the top-level response includes a pagination object:

FIELD

TYPE

DESCRIPTION

current_page

integer

The page number returned

per_page

integer

Page size used

total

integer

Total number of incidents matching the filter

total_pages

integer

Total number of pages

from

integer|null

1-based index of the first item on the current page

to

integer|null

1-based index of the last item on the current page

next_page_url

string|null

URL of the next page (or null on the last page)

prev_page_url

string|null

URL of the previous page (or null on the first page)

Request Examples

Paginated list — first page, default size (500 results, last 6 months):

curl --location 'https://app.complyflow.com.au/app/public/index.php/api/v3/incident/get-incident-data' \
--header 'Authorization: [...]'

Paginated list with explicit date range and page size:

curl --location 'https://app.complyflow.com.au/app/public/index.php/api/v3/incident/get-incident-data?fromDate=20250101T00%3A00%3A00&toDate=20250630T23%3A59%3A59&page=2&per_page=200' \
--header 'Authorization: [...]'

Single incident — supply incidentId as a query parameter:

curl --location 'https://app.complyflow.com.au/app/public/index.php/api/v3/incident/get-incident-data?incidentId=342' \
--header 'Authorization: [...]'

Response Example (paginated list)

{
"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",
"incidentTypes": [],
"correctiveActions": [],
"contributingFactors": []
}
],
"pagination": {
"current_page": 1,
"per_page": 500,
"total": 1234,
"total_pages": 3,
"from": 1,
"to": 500,
"next_page_url": "https://app.complyflow.com.au/app/public/index.php/api/v3/incident/get-incident-data?fromDate=20250101T00%3A00%3A00&toDate=20250630T23%3A59%3A59&per_page=500&page=2",
"prev_page_url": null
}
}

Response Example (single incident)

When incidentId is supplied, the response uses the same shape as V2 (no pagination block). See the Get Incident Data V2 page for the full nested shape of incidentTypes, correctiveActions, and contributingFactors.

Validation errors

Condition

Error

fromDate is after toDate

fromDate must be before toDate

Date range exceeds 730 days

Date range cannot exceed 2 years

per_page > 1000

The per_page field must not be greater than 1000

Did this answer your question?