Skip to main content

Get Inspection Actions v2

Written by Support
Updated today

Overview

This is an enhanced version of the existing GET inspection-actions endpoint. Version 2 adds additional filtering capabilities to support retrieving ALL checklist items (not just actions), while maintaining backward compatibility with the v1 response structure.

API Versions

The V1 endpoint remains available but v2 is recommended for new integrations.

Production Endpoint: https://app.complyflow.com.au/app/public/index.php/api/acu/inspection-actions
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/acu/inspection-actions

Version 2 - Recommended

New Endpoint: GET /api/acu/v2/inspection-actions
Production Endpoint: https://app.complyflow.com.au/app/public/index.php/api/acu/v2/inspection-actions
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/acu/v2/inspection-actions

What's New in v2:

  • Filter by action_required — get checklist items (action_required = 'N') in addition to actions

  • Filter by inspection_id — get items from a specific inspection

  • Filter by inspection_template_id — get items from inspections using a specific template

  • Filter by pass_status — filter by pass/fail/NA status

  • All existing v1 filters remain (from_date, to_date, completed, overdue, inspection_program_id)

  • v1 endpoint still works and remains available

Key Differences from v1

Feature

v1

v2

Returns actions only

Yes (action_required = Y)

Configurable

Returns checklist items

No

Yes (with filter)

Filter by inspection_id

No

Yes

Filter by template_id

No

Yes

Filter by action_required

No

Yes (Y/N/NA/all)

Filter by pass_status

No

Yes

Response structure

Same

Same

Pagination

50 per page

50 per page

Authentication Instructions

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

Permissions Required

The user should possess the permissions below:

  • API User

  • User is Staff

  • Inspection > Create & View all Inspections (Audit R or RW ORG level)

Please also refer to the Permissions Overview guide.

Query Parameters

Existing Parameters (from v1)

FIELD

TYPE

DESCRIPTION

Example

REQUIRED

DEFAULT

PATTERN

from_date

date

Filter for Inspection Action after this date

2024-01-01

No*

null

YYYY-MM-DD

to_date

date

Filter for Inspection Action before this date

2024-12-31

No*

null

YYYY-MM-DD

completed

boolean

Filter for completed status

true

No

null

true/false

overdue

boolean

Filter for overdue status

true

No

null

true/false

inspection_program_id

integer

Filter by Inspection Program ID

918

No

null

Digits

sort_by

string

Sort field

due_date

No

null

See list below

sort_order

string

Sort direction

asc

No

null

asc/desc

page

integer

Page number

1

No

1

Digits

New Parameters (v2 only)

FIELD

TYPE

DESCRIPTION

Example

REQUIRED

DEFAULT

PATTERN

action_required

string

Filter by action required status

all

No

Y

Y/N/NA/all

inspection_id

integer

Filter by specific Inspection ID

619690

No

null

Digits

inspection_template_id

integer

Filter by Inspection Template ID

45

No

null

Digits

pass_status

integer

Filter by pass/fail status

2

No

null

0/1/2/3

Parameter Value Details

action_required Values:

  • Y — Yes, action required (default, same as v1 behavior)

  • N — No, checklist item only (no action needed)

  • NA — Not applicable

  • all — Return everything (actions + checklist items)

pass_status Values:

  • 0 — Empty / Not set

  • 1 — Pass

  • 2 — Fail

  • 3 — Not applicable

sort_by Values (same as v1):

  • due_date, action_id, inspection_id, inspection_program_id, checklist_item, date_created, status, priority, date_completed

Date Parameter Rules

  • When provided, both from_date and to_date have a maximum range of 2 years

  • When not provided, to_date defaults to today and from_date defaults to 2 years back

Request Examples

Get Actions Only (Same as v1)

# Default behavior — returns only actions (action_required = Y)
GET /api/acu/v2/inspection-actions?from_date=2024-01-01&to_date=2024-12-31

Get ALL Items (Actions + Checklist Items)

GET /api/acu/v2/inspection-actions?from_date=2024-01-01&to_date=2024-12-31&action_required=all

Get Only Checklist Items (Not Actions)

GET /api/acu/v2/inspection-actions?from_date=2024-01-01&to_date=2024-12-31&action_required=N

Get All Items for a Specific Inspection

GET /api/acu/v2/inspection-actions?inspection_id=619690&action_required=all

Get Failed Items Requiring Action

GET /api/acu/v2/inspection-actions?from_date=2024-01-01&to_date=2024-12-31&action_required=Y&pass_status=2

Get All Items from a Specific Template

GET /api/acu/v2/inspection-actions?inspection_template_id=45&action_required=all&from_date=2024-01-01&to_date=2024-12-31


Pagination

GET /api/acu/v2/inspection-actions?from_date=2024-01-01&to_date=2024-12-31&action_required=all&page=2

cURL Example

curl --location 'https://app.complyflow.com.au/app/public/index.php/api/acu/v2/inspection-actions?from_date=2024-01-01&to_date=2024-12-31&action_required=all' \
--header 'Authorization: Bearer {token}'

Response Example

Success Response (200 OK)

{
"token": "",
"data": [
{
"action_id": 10365018,
"action_code": "RDS-619690-5",
"inspection_id": 619690,
"inspection_program_id": 918,
"checklist_item": "Method Statement Criteria",
"criteria": "Is a rescue plan identified?",
"date_created": "2025-10-30T13:10:22+11:00",
"due_date": "2025-11-13",
"finding": "Issues identified",
"recommendation": null,
"status": "completed",
"priority": "Med",
"assigned_to": {
"type": "staff",
"id": 27360,
"name": "Ryan Hansen"
},
"date_completed": "2025-10-30T00:00:00+11:00"
}
],
"pagination": {
"current_page": 1,
"total_pages": 3,
"total_items": 127,
"per_page": 50
}
}

The data array structure is the same as v1. v2 adds the pagination object to help navigate large result sets.

Error Responses

400 Bad Request — Invalid Parameters:

{
"token": "",
"status": false,
"message": "Validation failed",
"errors": {
"action_required": ["Invalid action_required value. Must be Y, N, NA, or all"],
"pass_status": ["Invalid pass_status value. Must be 0, 1, 2, or 3"]
}
}

401 Unauthorised — Expired Token:

{
"status": false,
"message": "Token has expired"
}

403 Forbidden — Insufficient Permissions:

{
"token": "",
"status": false,
"message": "You do not have permission to access inspection actions"
}

Migration Guide

For Existing v1 API Consumers

v2 is 100% backward compatible when you don't use the new parameters.

Option 1: No Changes Required — Keep using the v1 endpoint, it still works.

Option 2: Switch URL Only — Change from /api/acu/inspection-actions to /api/acu/v2/inspection-actions. Both return identical results when no v2 parameters are used.

Option 3: Gradual Migration — Switch to the v2 URL, verify identical behavior, then start adding new parameters as needed.

There are no breaking changes.

Version Recommendations

Use v2 when:

  • You need checklist items in addition to actions

  • You want to filter by specific inspection, template, or pass status

  • Building new integrations

v1 is still suitable when:

  • Existing integrations that only need actions

  • No need for the new filter capabilities

Performance Considerations

  • Automatic pagination (50 items per page)

  • 2-year maximum date range

  • Use specific filters (inspection_id, template_id) to narrow results

  • Avoid action_required=all with wide date ranges — returns significantly more data

Related Documentation

Did this answer your question?