Skip to main content

Get Inspection Actions

Support avatar
Written by Support
Updated over 3 months ago

GET [ inspection-actions ]

when provided, both from_date and to_date have a maximum range of 2 years only

if both are not provided, it will automatically set to_date to today and set from_date 2 years back from today

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

Overview

This endpoint returns list of inspection actions from the current Organisation. The endpoint automatically paginates results to maintain performance. By default, responses include 50 records per page. See sort_by, sort_order, and page in Query Parameters table for Pagination and Sorting.

Authentication instructions

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

Permissions Required

The user should possess the permissions below:

  • User is Staff

  • API Access security

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

Please also refer to the Permissions Overview guide.

Query parameters

FIELD

TYPE

DESCRIPTION

REQUIRED

from_date

date

Filter for Inspection Action after this date

to_date

date

Filter for Inspection Action before this date

completed

boolean

Filter for Inspection Action completed status

overdue

boolean

Filter for Inspection Action overdue status

inspection_program_id

integer

Filter for Inspection Action with Inspection Program ID

sort_by

string

To sort the results by specific column.

Accepted values: due_date,action_id,inspection_id,inspection_program_id,checklist_item,date_created,due_date,status,priority,date_completed

sort_order

string

To sort the results by ascending or descending order.

Accepted values: asc,desc

page

integer

To get results in specific page.

Request Example

curl --location 'http://test.complyflow.com/app/public/index.php/api/acu/inspection-actions?from_date=2025-02-01&to_date=2025-02-07&completed=false&inspection_program_id=60&sort_by=checklist_item&sort_order=desc&page=1' \
--header 'Accept: application/json' \
--header 'Authorization: [...]' \
--header 'Cookie: [...];'

Response Example

{
"token": "...",
"data": [
{
"action_id": 67556,
"action_code": "PRJ-67556-1",
"inspection_id": 2033,
"inspection_program_id": 60,
"checklist_item": "Category1",
"criteria": "Item 2",
"date_created": "2024-04-02T18:29:53+08:00",
"due_date": "2024-04-02",
"finding": "Not Compliant",
"recommendation": "Test",
"status": "pending",
"priority": "0",
"assigned_to": {
"type": "staff",
"id": 631,
"name": "Bukkos Istvan"
},
"date_completed": null
}
],
"pagination": {
"current_page": 1,
"total_pages": 1,
"total_items": 1,
"per_page": 50
}
}
Did this answer your question?