GET [ plant/{id} ]
Production Endpoint: https://app.complyflow.com.au/app/public/index.php/api/acu/plant/{id}
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/acu/plant/{id}
Overview
This endpoint returns the detail of a single Plant or Vehicle attached to the current Organisation.
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 Contractor Permission
Selected Plant belongs to the User’s Organisation
Please also refer to the Permissions Overview guide.
Query parameters
FIELD | TYPE | DESCRIPTION | Example | REQUIRED | DEFAULT | PATTERN |
|
| Plant ID |
| YES |
|
|
Request Example
curl --location 'http://test.complyflow.com.au/app/public/index.php/api/acu/plant/70' \
--header 'Authorization: [...]' \
--header 'Cookie: [...]'
Response Example
The API Request returns detail of single Plant or Vehicle attached to the current Organisation.
{
"token": "",
"data": {
"id": 70,
"contractor_id": 1554,
"company_name": "asda123123123123123",
"date_added": "2018-01-01T09:30:00.000000",
"make": "YES",
"model": "YES-123x",
"type": "BMW",
"year_of_manufacture": 2023,
"serial_number": "14236666",
"sticker_id": "",
"owned_by": "wr er",
"plant_categories": [
{
"id": 12,
"name": "PlantA",
"status": "Pending"
}
],
"documents": [
{
"id": 166,
"name": "DocA2"
}
],
"sites": [
{
"id": 41,
"name": "projecta"
}
],
"activation_deactivation_history": [
{
"id": 1,
"action": "Activated",
"date": "2023-01-15 14:30:00",
"user_name": "John Smith",
"performed_by_type": "Organisation"
},
{
"id": 2,
"action": "Deactivated",
"date": "2023-06-20 09:15:00",
"user_name": "ABC Contractors Pty Ltd",
"performed_by_type": "Contractor"
},
{
"id": 3,
"action": "Archived",
"date": "2023-11-30 16:45:00",
"user_name": "Jane Doe",
"performed_by_type": "Organisation"
}
]
}
}
Response Fields
Plant Details
Field Name | Type | Description |
id | integer | Unique identifier for the plant item |
contractor_id | integer | ID of the contractor who owns the plant (null if organisation-owned) |
company_name | string | Name of the company that owns the plant |
date_added | string | Timestamp when the plant was linked with the organisation (ISO 8601 format) |
make | string | Manufacturer/make of the plant |
model | string | Model of the plant |
type | string | Type/category of the plant |
year_of_manufacture | integer | Year the plant was manufactured |
serial_number | string | Serial number of the plant |
sticker_id | string | Plant sticker ID |
owned_by | string | Name of the owner |
plant_categories | array | List of plant categories with id, name, and status |
documents | array | List of associated documents with id and name |
sites | array | List of sites where the plant is assigned |
activation_deactivation_history | array | History of all activation, deactivation, and archival actions for this plant |
Activation/Deactivation History Fields
Field Name | Type | Description |
id | integer | Unique identifier for the history record |
action | string | Action performed: "Activated", "Deactivated", or "Archived" |
date | string | Timestamp when the action was performed (ISO 8601 format) |
user_name | string | Name of the user/company who performed the action |
performed_by_type | string | Type of entity that performed the action: "Organisation" or "Contractor" |
Notes
date_added
Represents when the plant item was linked with the organisation:
For organisation-owned plants: the date it was created under the organisation
For contractor-owned plants: the date it was added to the organisation
activation_deactivation_history
Only includes records for deactivation and archival actions. New plant items do not have an initial "Activated" entry; this action is only recorded when reactivating a previously deactivated/archived plant item.
Action types
"Deactivated": Plant item was set to "not in use" but not archived
"Archived": Plant item was fully archived
"Activated": Plant item was reactivated after being deactivated or archived
performed_by_type
Shows whether the action was performed by:
"Organisation": An organisation staff member (user_name shows the staff member's name)
"Contractor": A contractor user (user_name shows the contractor company name)