List companies (V2)
curl --request GET \
--url https://api.telemax.com.au/v2/api/companies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/v2/api/companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telemax.com.au/v2/api/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telemax.com.au/v2/api/companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.telemax.com.au/v2/api/companies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.telemax.com.au/v2/api/companies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"dateTimeFormat": "dd/MM/yyyy",
"timezone": "Australia/Brisbane",
"utcOffset": "10:00:00",
"items": [
{
"id": 34,
"name": "Acme Sydney",
"parentId": 12,
"showCommands": false,
"level": 1,
"apiKey": null
},
{
"id": 12,
"name": "Acme Fleet",
"parentId": null,
"showCommands": false,
"level": 0,
"apiKey": null
}
],
"totalResults": 2,
"lastResultIndex": 2,
"currentPage": 1,
"numberOfPages": 1
}
Companies & fleet
List companies
Returns a paginated list of the token’s company and its sub-companies.
GET
/
v2
/
api
/
companies
List companies (V2)
curl --request GET \
--url https://api.telemax.com.au/v2/api/companies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/v2/api/companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telemax.com.au/v2/api/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telemax.com.au/v2/api/companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.telemax.com.au/v2/api/companies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.telemax.com.au/v2/api/companies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"dateTimeFormat": "dd/MM/yyyy",
"timezone": "Australia/Brisbane",
"utcOffset": "10:00:00",
"items": [
{
"id": 34,
"name": "Acme Sydney",
"parentId": 12,
"showCommands": false,
"level": 1,
"apiKey": null
},
{
"id": 12,
"name": "Acme Fleet",
"parentId": null,
"showCommands": false,
"level": 0,
"apiKey": null
}
],
"totalResults": 2,
"lastResultIndex": 2,
"currentPage": 1,
"numberOfPages": 1
}
Overview
Returns the token’s company and its sub-companies, at every level. Sub-companies come first; the token’s own company (level 0) is listed last, so when there are more companies than pageSize it is on the last page. Cancelled companies, and the companies below them, are left out. Not every listed company can be used with other endpoints — see Token scoping.
This endpoint replaces V1 Company tree.
Rate limit: 4 req/s · 30/min · 600/hr · 14,400/day
Endpoint
GET /v2/api/companies
Query parameters
integer
default:"1"
Page number (1-based).
integer
default:"50"
Records per page.
Response
200 OK —CompaniesPagedResultDto (extends PagedListResult<CompanyDto>)
CompanyDto fields:
| Field | Type | Description |
|---|---|---|
| id | integer | Company ID |
| name | string | Company display name |
| parentId | integer | null | Parent company ID. Not null for the token’s own company when that company is itself a sub-company |
| showCommands | boolean | Always false |
| level | integer | Depth below the token’s company, which is 0 |
| apiKey | string | null | Company API key. null if no API key is configured for this company |
| Field | Type | Description |
|---|---|---|
| dateTimeFormat | string | The API key’s date format (e.g. "dd/MM/yyyy"); falls back to "yyyy-MM-dd" if unset |
| timezone | string | The API key’s IANA time zone (e.g. "Australia/Brisbane") |
| utcOffset | string | UTC offset of the API key’s time zone at request time. Positive offsets have no sign prefix (e.g. "10:00:00"); negative offsets include - (e.g. "-05:00:00") |
Example response
{
"items": [
{ "id": 34, "name": "Acme Sydney", "parentId": 12, "showCommands": false, "level": 1, "apiKey": null },
{ "id": 12, "name": "Acme Fleet", "parentId": null, "showCommands": false, "level": 0, "apiKey": null }
],
"currentPage": 1,
"numberOfPages": 1,
"totalResults": 2,
"lastResultIndex": 2,
"dateTimeFormat": "dd/MM/yyyy",
"timezone": "Australia/Brisbane",
"utcOffset": "10:00:00"
}
Error responses
| Status | Meaning |
|---|---|
| 401 | Missing, invalid or expired bearer token (INVALID_CREDENTIALS) |
| 403 | The API key lacks this endpoint’s permission (INVALID_SCOPE), or the company is suspended (CompanySuspended) — see 403 Forbidden |
curl "https://api.telemax.com.au/v2/api/companies" \
-H "Authorization: Bearer <token>"
Authorizations
JWT Bearer token obtained from POST /v2/api/authentication/token/api-key.
Lifetime: ~24 hours (86,399 seconds). Cache the token and reuse it. Re-authenticate 5 minutes before expiry.
Scoping: API key tokens are scoped by the key's company and its action set; see Token scoping.
No refresh endpoint — re-authenticate with your API key when the token expires.
Response
Successful response
Was this page helpful?