GET [ api/acu/psb ]
Production Endpoint: https://app.complyflow.com.au/app/public/index.php/api/acu/psb
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/acu/psb
Overview
Method:
GETURI:
api/acu/psbDescription: This endpoint returns the project sign book data and daily scans coming from ComplyFlow devices, filtered by date.
Authentication Instructions
Refer to the Authentication method for Authentication Methods (for Login and Logout).
Headers:
Authorization: Bearer <JWT_TOKEN>(string, required) - Forjwt.authmiddleware.Accept: application/json(string, recommended)
Permissions Required
The user required the permissions below:
API User
User is Staff
Please also refer to the Permissions Overview guide.
Query parameters
FIELD  | TYPE  | DESCRIPTION  | Example  | REQUIRED  | DEFAULT  | PATTERN  | 
  | 
  | Filter for Project Sign Book after this date  | 
  | Yes  | 
  | 
  | 
  | 
  | Filter for Project Sign Book before this date  | 
  | No  | 
  | 
  | 
Request Example
curl --location 'http://test.complyflow.com.au/app/public/index.php/api/acu/psb?dateFrom=2024-07-01&dateTo=2024-08-24' \
--header 'Authorization: [...]' \
--header 'Cookie: [...]'
Response Example
Success Response (200 OK)
Content-Type:
application/jsonBody:
{
  "token": "string (A new JWT issued after invalidating the request's token)",
  "data": [
        {
            "id": 3269,
            "entity_type": "E",
            "company": "asda123123123123123",
            "contractor_id": 1554,
            "employee_categories": [
                "WorkCateAInside",
                "WorkerCateB"
            ],
            "date": "2024-07-11",
            "long": "0.0",
            "lat": "0.0",
            "project": "projecta",
            "total_hours": "20:00",
            "flagged": 0
        }
    ]
}
Type of the entity (entity_type) are:
E β employee
S β staff
ID field (id) is :
Employee ID when entity_type is E
Staff ID when entity_type is S
Contractor ID Field (contractor_id) only have value when entity_type is E otherwise will empty
Company Field (company) is :
Contractor name of that Employee when entity_type is E
Organisation name of that Staff when entity_type is S
Employee Categories Field (employee_categories) value is an array which containing all categories of employee which attach to that Employee while if itβs Staff then will just gives empty value
Flagged Field (flagged) β can have the following values :
0 - accepted
1 - rejected
Breathalyser
Error Responses
401 Unauthorised (JWT Authentication Failed):
Triggered if the JWT is invalid, expired, or missing.
Response body structure depends on the
jwt.authmiddleware implementation (e.g.,{"error": "token_expired"}).
403 Forbidden:
Triggered if
acu.authmiddleware fails or if theauthorize()method inACUProjectSignBookIndexRequestreturnsfalse.The
authorize()method checks if the authenticated user profilehasApiAccess()andisStaff.Response body structure may vary.
422 Unprocessable Entity (Validation Failed by
ACUProjectSignBookIndexRequest):Content-Type:
application/jsonBody Examples:
If
dateFromis missing:
{
"token": "string (Refreshed JWT or original token)",
"status": false,
"error": "dateFrom is required",
"error_code": 4
}If
dateFromformat is incorrect:
{
"token": "string (Refreshed JWT or original token)",
"status": false,
"error": "dateFrom must be in Y-m-d format",
"error_code": 4
}If
dateToformat is incorrect:
{
"token": "string (Refreshed JWT or original token)",
"status": false,
"error": "dateTo must be in Y-m-d format",
"error_code": 4
}
Controller and Method
Controller:
App\Api\Controllers\\ACUProjectSignBookControllerMethod:
index(ACUProjectSignBookIndexRequest $request)