curl --request GET \
--url https://{base_url}/api/v1/organisations \
--header 'Authorization: Bearer <token>'import requests
url = "https://{base_url}/api/v1/organisations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{base_url}/api/v1/organisations', 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://{base_url}/api/v1/organisations",
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://{base_url}/api/v1/organisations"
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://{base_url}/api/v1/organisations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base_url}/api/v1/organisations")
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[
{
"id": "2089_9531",
"address": {
"id": "",
"city": "Auckland",
"country": "",
"line1": "182 Apirana Avenue",
"line2": "",
"postalCode": 1072,
"state": "Auckland",
"suburb": "Glen Innes"
},
"departments": [
{
"id": "2784_118",
"costCentreCode": "",
"manager": "",
"name": "Bakery",
"payRollCode": "",
"roles": [
{
"id": "2213_6820",
"costCentreCode": "",
"defaultActivity": "2760_183",
"name": "Assistant Manager"
},
{
"id": "2213_6559",
"costCentreCode": "",
"defaultActivity": "2760_183",
"name": "Retail Assistant"
}
],
"workDayFinishTime": "",
"workDayStartTime": ""
},
{
"id": "2784_121",
"costCentreCode": "",
"manager": "",
"name": "Storeroom",
"payRollCode": "",
"roles": [],
"workDayFinishTime": "",
"workDayStartTime": ""
}
],
"name": "Acme Supermarket",
"roles": [
{
"id": "2213_6820",
"costCentreCode": "",
"defaultActivity": "2760_183",
"name": "Assistant Manager"
},
{
"id": "2213_6559",
"costCentreCode": "",
"defaultActivity": "2760_183",
"name": "Retail Assistant"
}
],
"shifts": [
{
"id": "2786_12120",
"code": "AM",
"finishTime": "14:00",
"name": "Morning",
"startTime": "06:00"
},
{
"id": "2786_12121",
"code": "PM",
"finishTime": "22:00",
"name": "Afternoon",
"startTime": "14:00"
}
],
"workDayFinishTime": "22:00",
"workDayStartTime": "06:00"
}
]List all organisations
Returns a list of all the organisations under your head office. Returns only your organisation if you don’t have any organisations under yours.
curl --request GET \
--url https://{base_url}/api/v1/organisations \
--header 'Authorization: Bearer <token>'import requests
url = "https://{base_url}/api/v1/organisations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{base_url}/api/v1/organisations', 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://{base_url}/api/v1/organisations",
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://{base_url}/api/v1/organisations"
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://{base_url}/api/v1/organisations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base_url}/api/v1/organisations")
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[
{
"id": "2089_9531",
"address": {
"id": "",
"city": "Auckland",
"country": "",
"line1": "182 Apirana Avenue",
"line2": "",
"postalCode": 1072,
"state": "Auckland",
"suburb": "Glen Innes"
},
"departments": [
{
"id": "2784_118",
"costCentreCode": "",
"manager": "",
"name": "Bakery",
"payRollCode": "",
"roles": [
{
"id": "2213_6820",
"costCentreCode": "",
"defaultActivity": "2760_183",
"name": "Assistant Manager"
},
{
"id": "2213_6559",
"costCentreCode": "",
"defaultActivity": "2760_183",
"name": "Retail Assistant"
}
],
"workDayFinishTime": "",
"workDayStartTime": ""
},
{
"id": "2784_121",
"costCentreCode": "",
"manager": "",
"name": "Storeroom",
"payRollCode": "",
"roles": [],
"workDayFinishTime": "",
"workDayStartTime": ""
}
],
"name": "Acme Supermarket",
"roles": [
{
"id": "2213_6820",
"costCentreCode": "",
"defaultActivity": "2760_183",
"name": "Assistant Manager"
},
{
"id": "2213_6559",
"costCentreCode": "",
"defaultActivity": "2760_183",
"name": "Retail Assistant"
}
],
"shifts": [
{
"id": "2786_12120",
"code": "AM",
"finishTime": "14:00",
"name": "Morning",
"startTime": "06:00"
},
{
"id": "2786_12121",
"code": "PM",
"finishTime": "22:00",
"name": "Afternoon",
"startTime": "14:00"
}
],
"workDayFinishTime": "22:00",
"workDayStartTime": "06:00"
}
]Authorizations
Access token obtained from /oauth/token. Pass as Authorization: Bearer {token}
Query Parameters
Returns a specific organisation under your head office by its organisation ID.
Response
A list of organisations
The unique identifier for the organisation
"2089_9531"
Show child attributes
Show child attributes
A list of departments within this organisation
Show child attributes
Show child attributes
The display name of the organisation
"Acme Supermarket"
A list of all roles available across this organisation
Show child attributes
Show child attributes
A list of shift templates defined for this organisation
Show child attributes
Show child attributes
The default work day finish time for the organisation in HH:MM format
"22:00"
The default work day start time for the organisation in HH:MM format
"06:00"
Was this page helpful?

.png?fit=max&auto=format&n=fTXEPIUfjW4rC1Pi&q=85&s=85d7b852879d29ad2bde9b743307ab0e)