List Companies
curl --request POST \
--url https://api.telemax.com.au/api/GetCompanies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/api/GetCompanies"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telemax.com.au/api/GetCompanies', 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/api/GetCompanies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/api/GetCompanies"
req, _ := http.NewRequest("POST", 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.post("https://api.telemax.com.au/api/GetCompanies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/api/GetCompanies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"Companies": [
{
"id": 123,
"name": "Acme Corporation",
"parentId": null,
"showCommands": false
},
{
"id": 124,
"name": "Subsidiary Corp",
"parentId": 123,
"showCommands": true
}
],
"TimeZone": "SE Asia Standard Time",
"UtcOffset": "00:07:00",
"DateTimeFormat": "yyyy-MM-dd"
}{
"type": "AUTHENTICATION",
"code": "TOKEN_EXPIRED",
"description": "The access token has expired. Request a new token using /api/authentication/token/user or /api/authentication/token/api-key.",
"requestId": "req_7f3a2b1c",
"docUrl": "https://docs.telemax.com.au/errors#token-expired"
}{
"type": "AUTHORIZATION",
"code": "COMPANY_ACCESS_DENIED",
"description": "Your token does not grant access to company 99. Ensure you are using a token issued for this company.",
"requestId": "req_4a1d9e2f",
"docUrl": "https://docs.telemax.com.au/errors#company-access-denied"
}{
"type": "RATE_LIMIT",
"code": "RATE_LIMIT_EXCEEDED",
"description": "Too many requests. Wait 30 seconds before retrying.",
"requestId": "req_6d2f8b4a",
"docUrl": "https://docs.telemax.com.au/errors#rate-limit"
}{
"type": "SERVER_ERROR",
"code": "INTERNAL_ERROR",
"description": "An unexpected error occurred. Please try again or contact support with the requestId.",
"requestId": "req_1e5a3c7d",
"docUrl": "https://docs.telemax.com.au/errors#server-error"
}Companies & fleet
Company tree
Return the caller’s company hierarchy, timezone, and date format.
POST
/
api
/
GetCompanies
List Companies
curl --request POST \
--url https://api.telemax.com.au/api/GetCompanies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/api/GetCompanies"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telemax.com.au/api/GetCompanies', 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/api/GetCompanies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/api/GetCompanies"
req, _ := http.NewRequest("POST", 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.post("https://api.telemax.com.au/api/GetCompanies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/api/GetCompanies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"Companies": [
{
"id": 123,
"name": "Acme Corporation",
"parentId": null,
"showCommands": false
},
{
"id": 124,
"name": "Subsidiary Corp",
"parentId": 123,
"showCommands": true
}
],
"TimeZone": "SE Asia Standard Time",
"UtcOffset": "00:07:00",
"DateTimeFormat": "yyyy-MM-dd"
}{
"type": "AUTHENTICATION",
"code": "TOKEN_EXPIRED",
"description": "The access token has expired. Request a new token using /api/authentication/token/user or /api/authentication/token/api-key.",
"requestId": "req_7f3a2b1c",
"docUrl": "https://docs.telemax.com.au/errors#token-expired"
}{
"type": "AUTHORIZATION",
"code": "COMPANY_ACCESS_DENIED",
"description": "Your token does not grant access to company 99. Ensure you are using a token issued for this company.",
"requestId": "req_4a1d9e2f",
"docUrl": "https://docs.telemax.com.au/errors#company-access-denied"
}{
"type": "RATE_LIMIT",
"code": "RATE_LIMIT_EXCEEDED",
"description": "Too many requests. Wait 30 seconds before retrying.",
"requestId": "req_6d2f8b4a",
"docUrl": "https://docs.telemax.com.au/errors#rate-limit"
}{
"type": "SERVER_ERROR",
"code": "INTERNAL_ERROR",
"description": "An unexpected error occurred. Please try again or contact support with the requestId.",
"requestId": "req_1e5a3c7d",
"docUrl": "https://docs.telemax.com.au/errors#server-error"
}Overview
Returns the caller’s company hierarchy (including successors), with timezone, UTC offset string, andDateTimeFormat.
Requires valid CompanyId claim.
A V2 version of this endpoint is available: List companies. New integrations should prefer V2.
Endpoint
POST /api/GetCompanies
Authentication
Required. Bearer token.Response
200 OK —CompaniesDto
| Field | Type | Description |
|---|---|---|
| Companies | array of CompanyDto | Each: Name, Id, ParentId, ShowCommands (always false here), Level, ApiKey (deprecated) |
| TimeZone | string | IANA-style id from claims |
| UtcOffset | string | e.g. 10:00:00 |
| DateTimeFormat | string | User date format pattern |
Example response
{
"Companies": [
{
"Name": "Acme Logistics",
"Id": 12,
"ParentId": null,
"ShowCommands": false,
"Level": 0,
"ApiKey": ""
}
],
"TimeZone": "Australia/Sydney",
"UtcOffset": "10:00:00",
"DateTimeFormat": "dd/MM/yyyy"
}
Authorizations
JWT Bearer token obtained from POST /api/authentication/token/user or POST /api/authentication/token/api-key.
Lifetime: ~24 hours (86,399 seconds). Cache the token and reuse it. Re-authenticate 5 minutes before expiry.
Scoping:
- User tokens are scoped to a single company.
- API key tokens may restrict access to a vehicle allowlist and/or action set (see token claims).
No refresh endpoint — re-authenticate with your credentials when the token expires.
Headers
Standard and must keep as it is.
Bearer your_token
Was this page helpful?