MENU navbar-image

Introduction

WorxSafety API for managing inductees, contractors, assets, projects, inductions, documents, and more.

This documentation provides all the information you need to integrate with the WorxSafety API.

## Authentication

<aside class="warning">
<strong>All API requests require authentication using a Bearer token.</strong>
</aside>

Include your API token in the `Authorization` header of every request:

```
Authorization: Bearer {YOUR_API_TOKEN}
```

API tokens can be generated from your WorxSafety dashboard under **Settings > API Tokens**.

Each token has specific abilities/permissions that control which endpoints it can access.

## Testing the API

<aside class="notice">
<strong>Download the Postman collection</strong> to test API endpoints: <a href="/docs.postman">Download Postman Collection</a>
</aside>

Import the collection into Postman, then add your Bearer token in the Authorization tab.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_API_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

<strong>All endpoints require a Bearer token for authentication.</strong>

To obtain an API token:
1. Log in to your WorxSafety dashboard
2. Navigate to <b>Settings > API Tokens</b>
3. Click <b>Generate API Token</b>
4. Select the required abilities/permissions for your integration

<strong>Required Header:</strong>
<code>Authorization: Bearer {YOUR_API_TOKEN}</code>

Each token has specific abilities that determine which endpoints it can access (e.g., <code>user-read</code>, <code>asset-create</code>, <code>sites-read</code>).

Inductees

APIs for managing inductees (workers/employees).

Inductees are individual workers registered in the system. Use these endpoints to list, create, update, and manage worker records.

List all direct inductees

requires authentication

Returns all direct inductees (workers not associated with a contractor) for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Response

Response Fields

count   integer     

The total number of inductees

data   object[]     

List of inductee records

List all inductees

requires authentication

Returns all inductees (both direct and contractor-associated).

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/index/all" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/index/all"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/index/all';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/index/all

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List inactive inductees

requires authentication

Returns all inactive inductees.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/index/inactive" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/index/inactive"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/index/inactive';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/index/inactive

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List subcontracted inductees

requires authentication

Returns all inductees associated with contractors.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/index/subcontracted" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/index/subcontracted"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/index/subcontracted';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/index/subcontracted

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List approved inductees

requires authentication

Returns all approved inductees.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/index/approved" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/index/approved"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/index/approved';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/index/approved

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List revoked inductees

requires authentication

Returns all revoked/unapproved inductees.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/index/revoked" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/index/revoked"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/index/revoked';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/index/revoked

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get most recent inductee

requires authentication

Returns the most recently created inductee.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/recent" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/recent"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/recent

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Search inductees

requires authentication

Search for inductees by name, email, or ID.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/search/john" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/search/john"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/search/john';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/search/{search}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

search   string     

Search term (name, email, or ID). Example: john

Get inductee details

requires authentication

Returns detailed information for a specific inductee.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/show/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/show/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/show/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/show/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The user ID of the inductee. Example: 123

Test endpoint

requires authentication

Returns sample inductee data for testing API integration.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/test" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/test"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/test';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/test

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get inductee inductions

requires authentication

Returns all induction records for a specific inductee.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/inductions/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/inductions/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/inductions/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/inductions/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The user ID of the inductee. Example: 123

Get inductee training

requires authentication

Returns all training records for a specific inductee.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/training/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/training/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/training/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/training/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The user ID of the inductee. Example: 123

Get inductee documents

requires authentication

Returns all documents for a specific inductee.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/documents/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/documents/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/documents/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/documents/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The user ID of the inductee. Example: 123

Get inductee issues

requires authentication

Returns all issues related to a specific inductee.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/inductee/issues/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/issues/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/issues/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inductee/issues/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The user ID of the inductee. Example: 123

Create inductee

requires authentication

Create a new inductee record.

Example request:
curl --request POST \
    "https://app.worxsafety.com.au/api/inductee/create" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"John Smith\",
    \"email\": \"[email protected]\",
    \"active\": 1,
    \"approved\": 1,
    \"role\": \"user\",
    \"phone\": \"0244556677\",
    \"mobile\": \"0412345678\",
    \"emergencyContact\": \"Jane Smith\",
    \"emergencyPhone\": \"0498765432\",
    \"workType\": 1,
    \"residency\": \"architecto\",
    \"residencyDetails\": \"architecto\",
    \"residencyExpiry\": \"architecto\",
    \"dob\": \"1990-01-15\"
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/create"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "John Smith",
    "email": "[email protected]",
    "active": 1,
    "approved": 1,
    "role": "user",
    "phone": "0244556677",
    "mobile": "0412345678",
    "emergencyContact": "Jane Smith",
    "emergencyPhone": "0498765432",
    "workType": 1,
    "residency": "architecto",
    "residencyDetails": "architecto",
    "residencyExpiry": "architecto",
    "dob": "1990-01-15"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/create';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'John Smith',
            'email' => '[email protected]',
            'active' => 1,
            'approved' => 1,
            'role' => 'user',
            'phone' => '0244556677',
            'mobile' => '0412345678',
            'emergencyContact' => 'Jane Smith',
            'emergencyPhone' => '0498765432',
            'workType' => 1,
            'residency' => 'architecto',
            'residencyDetails' => 'architecto',
            'residencyExpiry' => 'architecto',
            'dob' => '1990-01-15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/inductee/create

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The inductee's full name. Example: John Smith

email   string     

The inductee's email address. Example: [email protected]

active   integer     

Account status (0 or 1). Example: 1

approved   integer     

Approval status (0 or 1). Example: 1

role   string     

Role type (user or admin). Example: user

phone   string     

Phone number. Example: 0244556677

mobile   string     

Mobile number. Example: 0412345678

emergencyContact   string     

Emergency contact name. Example: Jane Smith

emergencyPhone   string     

Emergency contact phone. Example: 0498765432

workType   integer  optional    

Work type ID. Example: 1

residency   string  optional    

Residency status. Example: architecto

residencyDetails   string  optional    

Residency details/timezone. Example: architecto

residencyExpiry   string  optional    

Residency expiry date (Y-m-d format). Example: architecto

dob   string     

Date of birth. Example: 1990-01-15

Update inductee

requires authentication

Update an existing inductee's information.

Example request:
curl --request PUT \
    "https://app.worxsafety.com.au/api/inductee/update/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\",
    \"email\": \"[email protected]\",
    \"active\": 16,
    \"approved\": 16,
    \"role\": \"architecto\",
    \"revokeReason\": \"architecto\",
    \"phone\": \"architecto\",
    \"mobile\": \"architecto\",
    \"emergencyContact\": \"architecto\",
    \"emergencyPhone\": \"architecto\",
    \"workType\": 16,
    \"residency\": \"S\",
    \"residencyDetails\": \"America\\/Bahia_Banderas\",
    \"residencyExpiry\": \"2026-01-29\",
    \"dob\": \"architecto\"
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/update/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "architecto",
    "email": "[email protected]",
    "active": 16,
    "approved": 16,
    "role": "architecto",
    "revokeReason": "architecto",
    "phone": "architecto",
    "mobile": "architecto",
    "emergencyContact": "architecto",
    "emergencyPhone": "architecto",
    "workType": 16,
    "residency": "S",
    "residencyDetails": "America\/Bahia_Banderas",
    "residencyExpiry": "2026-01-29",
    "dob": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/update/123';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'architecto',
            'email' => '[email protected]',
            'active' => 16,
            'approved' => 16,
            'role' => 'architecto',
            'revokeReason' => 'architecto',
            'phone' => 'architecto',
            'mobile' => 'architecto',
            'emergencyContact' => 'architecto',
            'emergencyPhone' => 'architecto',
            'workType' => 16,
            'residency' => 'S',
            'residencyDetails' => 'America/Bahia_Banderas',
            'residencyExpiry' => '2026-01-29',
            'dob' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/inductee/update/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The user ID of the inductee. Example: 123

Body Parameters

name   string  optional    

The inductee's full name. Example: architecto

email   string  optional    

The inductee's email address. Example: [email protected]

active   integer  optional    

Account status (0 or 1). Example: 16

approved   integer  optional    

Approval status (0 or 1). Example: 16

role   string  optional    

Role type (user or admin). Example: architecto

revokeReason   string  optional    

Reason for revoking approval. Example: architecto

phone   string  optional    

Phone number. Example: architecto

mobile   string  optional    

Mobile number. Example: architecto

emergencyContact   string  optional    

Emergency contact name. Example: architecto

emergencyPhone   string  optional    

Emergency contact phone. Example: architecto

workType   integer  optional    

Work type ID. Example: 16

residency   string  optional    

Must match the regex /^\S(?:.*\S)?$/. Example: S

residencyDetails   string  optional    

Must be a valid time zone, such as Africa/Accra. Example: America/Bahia_Banderas

residencyExpiry   string  optional    

Must be a valid date in the format Y-m-d. Example: 2026-01-29

dob   string  optional    

Date of birth (Y-m-d format). Example: architecto

Disable inductee

requires authentication

Disable/revoke an inductee account.

Example request:
curl --request PUT \
    "https://app.worxsafety.com.au/api/inductee/disable/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/inductee/disable/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/inductee/disable/123';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/inductee/disable/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The user ID of the inductee. Example: 123

Contractors

APIs for managing contractor companies and their workers.

Contractors are external companies that provide workers to your organization. Use these endpoints to list contractors, view their workers, and manage contractor relationships.

List all contractors

requires authentication

Returns all contractor companies associated with your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/contractor/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/contractor/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/contractor/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contractor/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List approved contractors

requires authentication

Returns all approved contractor companies.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/contractor/index/approved" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/contractor/index/approved"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/contractor/index/approved';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contractor/index/approved

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List revoked contractors

requires authentication

Returns all revoked/unapproved contractor companies.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/contractor/index/revoked" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/contractor/index/revoked"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/contractor/index/revoked';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contractor/index/revoked

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get contractor by ABN

requires authentication

Find a contractor company by their ABN (Australian Business Number).

Example request:
curl --request POST \
    "https://app.worxsafety.com.au/api/contractor/abn" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"abn\": \"12345678901\"
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/contractor/abn"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "abn": "12345678901"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/contractor/abn';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'abn' => '12345678901',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/contractor/abn

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

abn   string     

The contractor's ABN. Example: 12345678901

Get contractor details

requires authentication

Returns detailed information for a specific contractor company.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/contractor/show/456" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/contractor/show/456"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/contractor/show/456';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contractor/show/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The contractor ID. Example: 456

Get contractor's inductees

requires authentication

Returns all workers/inductees for a specific contractor company.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/contractor/show/456/inductee" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/contractor/show/456/inductee"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/contractor/show/456/inductee';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contractor/show/{id}/inductee

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The contractor ID. Example: 456

requires authentication

Search for contractor companies by name or email. Name search uses partial matching (e.g., "MGN" finds "MGN Projects Pty Ltd"). Email search uses exact matching.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/contractor/search?search=MGN+Projects" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/contractor/search"
);

const params = {
    "search": "MGN Projects",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/contractor/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search' => 'MGN Projects',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "count": 1,
    "data": [
        {
            "id": 14,
            "name": "MGN Projects Pty Ltd",
            "email": "[email protected]",
            "active": 1
        }
    ]
}
 

Assets

APIs for managing assets (plant, equipment, vehicles).

Assets include machinery, vehicles, tools, and other equipment that require tracking, maintenance records, and compliance documentation.

List all assets

requires authentication

Returns all assets for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/asset/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/asset/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Search assets

requires authentication

Search for assets by make, model, or ID.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/asset/search/toyota" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/search/toyota"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/search/toyota';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/asset/search/{search}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

search   string     

Search term. Example: toyota

Get asset details

requires authentication

Returns detailed information for a specific asset.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/asset/show/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/show/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/show/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/asset/show/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The asset ID. Example: 123

Test endpoint

requires authentication

Returns sample asset data for testing API integration.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/asset/test" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/test"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/test';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/asset/test

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get most recent asset

requires authentication

Returns the most recently created asset.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/asset/recent" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/recent"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/asset/recent

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get asset documents

requires authentication

Returns all documents for a specific asset.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/asset/documents/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/documents/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/documents/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/asset/documents/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The asset ID. Example: 123

Get asset prestarts

requires authentication

Returns prestart check records for a specific asset.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/asset/prestarts/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/prestarts/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/prestarts/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/asset/prestarts/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The asset ID. Example: 123

Get asset service records

requires authentication

Returns maintenance/service records for a specific asset.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/asset/maintenance/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/maintenance/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/maintenance/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/asset/maintenance/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The asset ID. Example: 123

Create asset

requires authentication

Create a new asset record.

Example request:
curl --request POST \
    "https://app.worxsafety.com.au/api/asset/create" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"make\": \"Toyota\",
    \"model\": \"Hilux\",
    \"serialNumber\": \"architecto\",
    \"registration\": \"architecto\",
    \"location\": \"architecto\",
    \"approver\": 16,
    \"meterType\": \"KM\",
    \"serviceInterval\": 16,
    \"serviceIntervalRead\": 16,
    \"serviceDueRead\": 16
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/create"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "make": "Toyota",
    "model": "Hilux",
    "serialNumber": "architecto",
    "registration": "architecto",
    "location": "architecto",
    "approver": 16,
    "meterType": "KM",
    "serviceInterval": 16,
    "serviceIntervalRead": 16,
    "serviceDueRead": 16
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/create';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'make' => 'Toyota',
            'model' => 'Hilux',
            'serialNumber' => 'architecto',
            'registration' => 'architecto',
            'location' => 'architecto',
            'approver' => 16,
            'meterType' => 'KM',
            'serviceInterval' => 16,
            'serviceIntervalRead' => 16,
            'serviceDueRead' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/asset/create

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

make   string     

The asset make/manufacturer. Example: Toyota

model   string     

The asset model. Example: Hilux

serialNumber   string  optional    

Serial number. Example: architecto

registration   string  optional    

Registration number. Example: architecto

location   string  optional    

Asset location. Example: architecto

approver   integer  optional    

Approver account ID. Example: 16

meterType   string     

Meter type (HRS, KM, MI, or N/A). Example: KM

serviceInterval   integer  optional    

Service interval value. Example: 16

serviceIntervalRead   integer  optional    

Service interval reading. Example: 16

serviceDueRead   integer  optional    

Service due reading. Example: 16

Create asset service item

requires authentication

Add a service item to an existing asset.

Example request:
curl --request POST \
    "https://app.worxsafety.com.au/api/asset/item/create" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"assetId\": 123,
    \"itemName\": \"Oil Filter\",
    \"meterType\": \"KM\",
    \"meterReading\": 50000,
    \"serviceInterval\": 10000,
    \"nextInterval\": 60000,
    \"serviceFrequency\": 12,
    \"nextFrequency\": \"2024-12-01\"
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/item/create"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "assetId": 123,
    "itemName": "Oil Filter",
    "meterType": "KM",
    "meterReading": 50000,
    "serviceInterval": 10000,
    "nextInterval": 60000,
    "serviceFrequency": 12,
    "nextFrequency": "2024-12-01"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/item/create';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'assetId' => 123,
            'itemName' => 'Oil Filter',
            'meterType' => 'KM',
            'meterReading' => 50000,
            'serviceInterval' => 10000,
            'nextInterval' => 60000,
            'serviceFrequency' => 12,
            'nextFrequency' => '2024-12-01',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/asset/item/create

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

assetId   integer     

The asset ID. Example: 123

itemName   string     

Service item name. Example: Oil Filter

meterType   string     

Meter type (HRS, KM, MI, or N/A). Example: KM

meterReading   integer     

Current meter reading. Example: 50000

serviceInterval   integer     

Service interval. Example: 10000

nextInterval   integer     

Next service interval. Example: 60000

serviceFrequency   integer     

Service frequency. Example: 12

nextFrequency   string     

Next service date (Y-m-d). Example: 2024-12-01

Update asset service item

requires authentication

Update an existing asset service item.

Example request:
curl --request PUT \
    "https://app.worxsafety.com.au/api/asset/item/update/456" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"itemName\": \"S\",
    \"meterType\": \"KM\",
    \"meterReading\": 16,
    \"serviceInterval\": 16,
    \"nextInterval\": 16,
    \"serviceFrequency\": 16
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/item/update/456"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "itemName": "S",
    "meterType": "KM",
    "meterReading": 16,
    "serviceInterval": 16,
    "nextInterval": 16,
    "serviceFrequency": 16
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/item/update/456';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'itemName' => 'S',
            'meterType' => 'KM',
            'meterReading' => 16,
            'serviceInterval' => 16,
            'nextInterval' => 16,
            'serviceFrequency' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/asset/item/update/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The service item ID. Example: 456

Body Parameters

itemName   string  optional    

Must match the regex /^\S(?:.*\S)?$/. Example: S

meterType   string  optional    

Example: KM

Must be one of:
  • HRS
  • KM
  • MI
  • N/A
meterReading   integer  optional    

Example: 16

serviceInterval   integer  optional    

Example: 16

nextInterval   integer  optional    

Example: 16

serviceFrequency   integer  optional    

Example: 16

Update asset

requires authentication

Update an existing asset's information.

Example request:
curl --request PUT \
    "https://app.worxsafety.com.au/api/asset/update/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"make\": \"S\",
    \"model\": \"S\",
    \"serialNumber\": \"S\",
    \"registration\": \"S\",
    \"location\": \"S\",
    \"approver\": 16,
    \"meterType\": \"HRS\",
    \"meterRead\": 16,
    \"serviceInterval\": 16,
    \"serviceIntervalRead\": 16,
    \"serviceDueRead\": 16
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/update/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "make": "S",
    "model": "S",
    "serialNumber": "S",
    "registration": "S",
    "location": "S",
    "approver": 16,
    "meterType": "HRS",
    "meterRead": 16,
    "serviceInterval": 16,
    "serviceIntervalRead": 16,
    "serviceDueRead": 16
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/update/123';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'make' => 'S',
            'model' => 'S',
            'serialNumber' => 'S',
            'registration' => 'S',
            'location' => 'S',
            'approver' => 16,
            'meterType' => 'HRS',
            'meterRead' => 16,
            'serviceInterval' => 16,
            'serviceIntervalRead' => 16,
            'serviceDueRead' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/asset/update/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The asset ID. Example: 123

Body Parameters

make   string  optional    

Must match the regex /^\S(?:.*\S)?$/. Example: S

model   string  optional    

Must match the regex /^\S(?:.*\S)?$/. Example: S

serialNumber   string  optional    

Must match the regex /^\S(?:.*\S)?$/. Example: S

registration   string  optional    

Must match the regex /^\S(?:.*\S)?$/. Example: S

location   string  optional    

Must match the regex /^\S(?:.*\S)?$/. Example: S

approver   integer  optional    

Example: 16

meterType   string  optional    

Example: HRS

Must be one of:
  • HRS
  • KM
  • MI
  • N/A
meterRead   integer  optional    

Example: 16

serviceInterval   integer  optional    

Example: 16

serviceIntervalRead   integer  optional    

Example: 16

serviceDueRead   integer  optional    

Example: 16

Delete asset

requires authentication

Delete an asset record.

Example request:
curl --request PUT \
    "https://app.worxsafety.com.au/api/asset/disable/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/asset/disable/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/asset/disable/123';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/asset/disable/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The asset ID. Example: 123

Projects

APIs for managing projects (work sites/locations).

Projects represent physical work locations including address, contacts, and associated workers/contractors.

List all projects

requires authentication

Returns all projects for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/project/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/project/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/project/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Search projects

requires authentication

Search for projects by name or ID.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/project/search/construction" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/project/search/construction"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project/search/construction';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/project/search/{search}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

search   string     

Search term. Example: construction

Get most recent project

requires authentication

Returns the most recently created project.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/project/recent" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/project/recent"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/project/recent

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get project details

requires authentication

Returns detailed information for a specific project.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/project/show/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/project/show/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project/show/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/project/show/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The project ID. Example: 123

Get recent SWMS PDF

requires authentication

Returns a download URL for the most recent approved SWMS PDF.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/project/swms/pdf/recent" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/project/swms/pdf/recent"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project/swms/pdf/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/project/swms/pdf/recent

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get recent form submission PDF

requires authentication

Returns a download URL for the most recent form submission PDF.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/project/form_submission/pdf/recent" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/project/form_submission/pdf/recent"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project/form_submission/pdf/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/project/form_submission/pdf/recent

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Create project

requires authentication

Create a new project/work site.

Example request:
curl --request POST \
    "https://app.worxsafety.com.au/api/project/create" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Main Street Construction\",
    \"street\": \"123 Main Street\",
    \"suburb\": \"Sydney\",
    \"state\": \"NSW\",
    \"phone\": \"0244556677\",
    \"manager\": \"John Smith\",
    \"contractors\": \"1,2,3\"
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/project/create"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Main Street Construction",
    "street": "123 Main Street",
    "suburb": "Sydney",
    "state": "NSW",
    "phone": "0244556677",
    "manager": "John Smith",
    "contractors": "1,2,3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project/create';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Main Street Construction',
            'street' => '123 Main Street',
            'suburb' => 'Sydney',
            'state' => 'NSW',
            'phone' => '0244556677',
            'manager' => 'John Smith',
            'contractors' => '1,2,3',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/project/create

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Project name. Example: Main Street Construction

street   string     

Street address. Example: 123 Main Street

suburb   string     

Suburb. Example: Sydney

state   string     

Australian state (NSW, VIC, QLD, WA, SA, TAS, NT). Example: NSW

phone   string     

Contact phone. Example: 0244556677

manager   string     

Site manager name. Example: John Smith

contractors   string  optional    

Comma-separated contractor IDs. Example: 1,2,3

Update project

requires authentication

Update an existing project's information.

Example request:
curl --request PUT \
    "https://app.worxsafety.com.au/api/project/update/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"street\": \"architecto\",
    \"suburb\": \"n\",
    \"state\": \"g\",
    \"phone\": \"z\",
    \"manager\": \"m\",
    \"contractors\": \"architecto\"
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/project/update/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "street": "architecto",
    "suburb": "n",
    "state": "g",
    "phone": "z",
    "manager": "m",
    "contractors": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project/update/123';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'street' => 'architecto',
            'suburb' => 'n',
            'state' => 'g',
            'phone' => 'z',
            'manager' => 'm',
            'contractors' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/project/update/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The project ID. Example: 123

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

street   string  optional    

Example: architecto

suburb   string  optional    

Must not be greater than 255 characters. Example: n

state   string  optional    

Must not be greater than 255 characters. Example: g

phone   string  optional    

Must not be greater than 255 characters. Example: z

manager   string  optional    

Must not be greater than 255 characters. Example: m

contractors   string  optional    

Example: architecto

Project Events

APIs for managing project site events and activity tracking.

Track site sign-ins, sign-outs, and other project-related events.

List all project events

requires authentication

Returns all project events across all projects for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/project_events/all" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/project_events/all"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project_events/all';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/project_events/all

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get project events

requires authentication

Returns all events for a specific project.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/project_events/show/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/project_events/show/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project_events/show/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/project_events/show/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The project ID. Example: 123

requires authentication

Example request:
curl --request POST \
    "https://app.worxsafety.com.au/api/project_events/search" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/project_events/search"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/project_events/search';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Inductions & Training

APIs for managing inductions, training programs, and site-specific inductions.

Track completion status, expiry dates, and enrollment records for safety training and induction programs.

List all inductions

requires authentication

Returns all induction programs for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/induction/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/induction/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/induction/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/induction/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List all training programs

requires authentication

Returns all training programs for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/training/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/training/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/training/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/training/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List site inductions

requires authentication

Returns all site-specific induction programs for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/site_induction/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/site_induction/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/site_induction/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/site_induction/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get most recent induction

requires authentication

Returns the most recently created induction.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/induction/recent" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/induction/recent"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/induction/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/induction/recent

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get most recent training

requires authentication

Returns the most recently created training program.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/training/recent" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/training/recent"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/training/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/training/recent

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get induction records

requires authentication

Returns all records for a specific induction program.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/induction/records/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/induction/records/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/induction/records/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/induction/records/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The induction ID. Example: 123

Get training records

requires authentication

Returns all records for a specific training program.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/training/records/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/training/records/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/training/records/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/training/records/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The training/induction ID. Example: 123

Get site induction records

requires authentication

Returns all records for a specific site induction program.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/site_induction/records/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/site_induction/records/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/site_induction/records/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/site_induction/records/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The site induction ID. Example: 123

Documents

APIs for managing documents and compliance records.

Track document expiry, validity status, and ownership across workers, assets, projects, and contractor companies.

List all documents

requires authentication

Returns all documents with expiry dates for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/documents/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/documents/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/documents/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/documents/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List valid documents

requires authentication

Returns all documents that are currently valid (not expired or expiring soon).

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/documents/index/valid" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/documents/index/valid"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/documents/index/valid';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/documents/index/valid

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List expired documents

requires authentication

Returns all documents that have already expired.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/documents/index/expired" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/documents/index/expired"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/documents/index/expired';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/documents/index/expired

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

List expiring documents

requires authentication

Returns all documents expiring within the next 10 days.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/documents/index/expiring" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/documents/index/expiring"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/documents/index/expiring';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/documents/index/expiring

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Issues

APIs for managing safety, quality, and operational issues.

Issues can be related to workers, assets, projects, or contractor companies. Track acknowledgment, actions, and resolution of workplace issues.

List all issues

requires authentication

Returns all issues for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/issue/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/issue/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/issue/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/issue/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get most recent issue

requires authentication

Returns the most recently created issue.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/issue/recent" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/issue/recent"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/issue/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/issue/recent

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Search issues

requires authentication

Search for issues by description or ID.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/issue/search/safety" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/issue/search/safety"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/issue/search/safety';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/issue/search/{search}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

search   string     

Search term. Example: safety

Get issue details

requires authentication

Returns detailed information for a specific issue.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/issue/show/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/issue/show/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/issue/show/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/issue/show/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The issue ID. Example: 123

Test endpoint

requires authentication

Returns sample issue data for testing API integration.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/issue/test" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/issue/test"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/issue/test';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/issue/test

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Create issue

requires authentication

Create a new issue record.

Example request:
curl --request POST \
    "https://app.worxsafety.com.au/api/issue/create" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ownerId\": 123,
    \"issueType\": \"Safety\",
    \"relationType\": \"Project\",
    \"relationId\": 456,
    \"description\": \"Fire extinguisher needs inspection\",
    \"dueDate\": \"2024-12-31\",
    \"priority\": \"High\"
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/issue/create"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ownerId": 123,
    "issueType": "Safety",
    "relationType": "Project",
    "relationId": 456,
    "description": "Fire extinguisher needs inspection",
    "dueDate": "2024-12-31",
    "priority": "High"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/issue/create';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ownerId' => 123,
            'issueType' => 'Safety',
            'relationType' => 'Project',
            'relationId' => 456,
            'description' => 'Fire extinguisher needs inspection',
            'dueDate' => '2024-12-31',
            'priority' => 'High',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/issue/create

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

ownerId   integer     

The owner/assignee account ID. Example: 123

issueType   string     

Issue type (Safety, Quality, Environmental, Operational, Uncategorised). Example: Safety

relationType   string     

Related entity type (Project, Asset, Worker, ContractorCompany). Example: Project

relationId   integer     

Related entity ID. Example: 456

description   string     

Issue description. Example: Fire extinguisher needs inspection

dueDate   string  optional    

Due date (Y-m-d format). Example: 2024-12-31

priority   string     

Priority level (High, Medium, Low). Example: High

Subscriptions

APIs for managing webhook subscriptions.

Subscribe to events and receive webhook notifications when data changes occur.

List all subscriptions

requires authentication

Returns all webhook subscriptions for your API token.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/subscription/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/subscription/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/subscription/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/subscription/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Create subscription

requires authentication

Create a new webhook subscription.

Example request:
curl --request POST \
    "https://app.worxsafety.com.au/api/subscription/create" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"hookUrl\": \"https:\\/\\/example.com\\/webhook\",
    \"event\": \"inductee.created\"
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/subscription/create"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "hookUrl": "https:\/\/example.com\/webhook",
    "event": "inductee.created"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/subscription/create';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'hookUrl' => 'https://example.com/webhook',
            'event' => 'inductee.created',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/subscription/create

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

hookUrl   string     

The webhook URL to receive notifications. Example: https://example.com/webhook

event   string     

The event type to subscribe to. Example: inductee.created

Delete subscription

requires authentication

Delete a webhook subscription by URL.

Example request:
curl --request POST \
    "https://app.worxsafety.com.au/api/subscription/delete" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"hookUrl\": \"https:\\/\\/example.com\\/webhook\"
}"
const url = new URL(
    "https://app.worxsafety.com.au/api/subscription/delete"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "hookUrl": "https:\/\/example.com\/webhook"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/subscription/delete';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'hookUrl' => 'https://example.com/webhook',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/subscription/delete

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

hookUrl   string     

The webhook URL to unsubscribe. Example: https://example.com/webhook

Registers

APIs for managing registers (Risk Registers, WHS Registers, etc.).

Registers are configurable data tables that can be used for tracking various types of information including Company Risk Registers, Operational WHS Risk Registers, and other compliance data.

List all registers

requires authentication

Returns all registers for your client, including Company Risk Register and Operational WHS Risk Register.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/register/index" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/register/index"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/register/index';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/register/index

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Search registers

requires authentication

Search for registers by name.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/register/search/Risk" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/register/search/Risk"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/register/search/Risk';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/register/search/{search}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

search   string     

Search term. Example: Risk

Get most recent register

requires authentication

Returns the most recently created register for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/register/recent" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/register/recent"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/register/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/register/recent

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get most recent register entry

requires authentication

Returns the most recently created register entry across all registers for your client.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/register/entry/recent" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/register/entry/recent"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/register/entry/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/register/entry/recent

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get register details

requires authentication

Returns detailed information for a specific register including its column definitions.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/register/show/1" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/register/show/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/register/show/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/register/show/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The register ID. Example: 1

Get register entries

requires authentication

Returns all entries for a specific register. This is the data stored in the register.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/register/entries/1?page=1&perPage=50" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/register/entries/1"
);

const params = {
    "page": "1",
    "perPage": "50",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/register/entries/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'perPage' => '50',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/register/entries/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The register ID. Example: 1

Query Parameters

page   integer  optional    

Page number for pagination. Example: 1

perPage   integer  optional    

Number of entries per page (max 100). Example: 50

Get single entry

requires authentication

Returns a single register entry by ID.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/register/1/entry/123" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/register/1/entry/123"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/register/1/entry/123';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/register/{registerId}/entry/{entryId}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registerId   integer     

The register ID. Example: 1

entryId   integer     

The entry ID. Example: 123

Get entry files

requires authentication

Returns all files attached to a specific register entry row.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/register/1/entry/123/files" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/register/1/entry/123/files"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/register/1/entry/123/files';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/register/{registerId}/entry/{entryId}/files

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registerId   integer     

The register ID. Example: 1

entryId   integer     

The entry ID. Example: 123

Download entry file

requires authentication

Download a file from a register entry using only register and document IDs.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/register/1/document/456/download" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/register/1/document/456/download"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/register/1/document/456/download';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/register/{registerId}/document/{documentId}/download

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registerId   integer     

The register ID. Example: 1

documentId   integer     

The document ID. Example: 456

Get entry file download URL

requires authentication

Returns a temporary download URL for a file from a register entry. The URL is valid for 2 hours.

Example request:
curl --request GET \
    --get "https://app.worxsafety.com.au/api/register/1/document/456/download_url" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.worxsafety.com.au/api/register/1/document/456/download_url"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://app.worxsafety.com.au/api/register/1/document/456/download_url';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/register/{registerId}/document/{documentId}/download_url

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registerId   integer     

The register ID. Example: 1

documentId   integer     

The document ID. Example: 456