Skip to main content

Authorisation API Documentation

Support avatar
Written by Support
Updated over a year ago

Authentication method

All of our API endpoints use JWT (JSON Web Token) for authentication and authorisation. This ensures that users are eligible and authorized to access our API. Each successful API request returns a token, which must be included in subsequent requests to verify the user's identity and permissions.

Return format (JSON standard RFC 7519)

Example of response (Get Contractors List):

{
"token":"generated_token",
"data":[
{
"id":"11",
"abn":"01 234 567 890",
"company_name":"Test Contractor",
"email":"@complyflow.com.au",
"trade_name":"Test",
"address":"NSW",
"postcode":"2096",
"contact_name":"John",
"status":"Active",
"phone":"0411 999 999",
"fax":"0411 999 999",
"project":[
"Project 1",
"Project 2"
],
"timestamp":{
"date":"2018-01-07 12:14:52.000000",
"timezone_type":3,
"timezone":"Australia/Sydney"
},
"documents":[
{
"id":6,
"name":"Drivers Licence",
"expiry_date":{
"date":"2015-03-14 00:00:00.000000",
"timezone_type":3,
"timezone":"Australia/Sydney"
}
}
],
"attributes":[
{
"name":"Attribute 1",
"value":"Yes"
},
{
"name":"Attribute 2",
"value":"Yes"
}
],
"hr_custom_fields": {
"covidDose1": "03/03/2021",
"covidDose2": "02/09/2021",
"covidDose3": "01/03/2022"
}
}
]
}

Login

POST [ login ]

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

Overview

This request is used to log in to the ComplyFlow system.

Body properties/Payload

FIELD

TYPE

DESCRIPTION

REQUIRED

username

string

Email used for login

Yes

password

string

Password used for login

Yes

Request Example

curl --location 'http://test.complyflow.com.au/app/public/index.php/api/acu/login'\
--header 'Cookie: ...'\
--form 'username="user@gmail.com"'\
--form 'password="user1234"'

Response Example

The API request returns a token required for further use of the Comply Flow API.

{
"token": "TOKEN_EXAMPLE",
"data": {
"status": true
}
}

Logout

GET [ logout ]

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

Overview

This request is used to log out of the ComplyFlow system.

Request Example

curl --location 'http://test.complyflow.com.au/app/public/index.php/api/acu/logout'\
--header 'Authorization: ...'\
--header 'Cookie: ...'

Response Example

The API Request returns status and message of this action.

{
"data": {
"status": true,
"message": "Successfully logged out"
}
}

Did this answer your question?