List the organisations you can see
Needs permission organisation:read.
Your account’s organisations come in two kinds, marked by relationship: Owned, and Managed for an organisation your account manages on its owner’s behalf, such as a bureau’s client. ?relationship=owned or managed keeps one kind (400 conflicting_filters with accessType=Guest). The order is owned (by name), then managed (by id), then guest; search narrows all three by the start of the name (punctuation and spaces ignored). Managed and guest pages are matched within the page read, so one may hold fewer than pageSize rows, or none, and still carry a paginationToken: keep following it.
Both kinds of organisation: the account’s own, in name order, then any you reach as a guest of another business. accessType on each row says which — Customer or Guest — and the accessType query parameter filters to one kind. One page holds one kind, so follow the token to exhaustion to see both. search matches the start of an organisation’s name in every phase, as above.
The account’s own list is not only the ones you can reach. callerAccess.granted on each row says whether you can act on that organisation. An administrator who runs 12 of an account’s 40 organisations still needs to know the other 28 exist, so the list includes them and marks them. A guest organisation is managed by its own account: you can open it, never administer it here.
Paginated: pageSize (default 50, at most 100) and paginationToken. Follow the token until it is absent — a page is never the whole list while a token is present.
To find who can reach one of the account’s organisations, call GET /users?organisationId={organisationId}.
Organisation groups. Each row’s groups names your account’s organisation groups it is in (groupId, name), never another account’s: an organisation your account manages may also be in its owner’s groups, and those are not shown. Always empty on a guest row. groupId lists only one of your groups’ organisations, in id order, and only those your account still owns or manages; search and relationship narrow within each page read, so a page may be short and still carry a paginationToken. A group that is not your account’s, or is being deleted, answers 404 group_not_found; groupId with accessType=Guest is 400 conflicting_filters. Groups are for people who hold access in your account: anybody else gets 403 from groupId, as from GET /organisation-groups, and groups empty on every row. For the filter chips’ counts, use organisationCount on GET /organisation-groups.
externalId. Each owned or managed row’s externalId is your account’s own identifier for it; another account that owns or manages the same organisation keeps its own, never shown to you, and guest rows have none. externalId as a filter finds the one organisation your account owns or manages with that value (exact and case-sensitive): one row, or none, and no paginationToken. search and relationship still narrow; groupId, organisationType, businessType, minEmployees or maxEmployees with it is 400 conflicting_filters.
Narrowing your own organisations. organisationType and businessType (repeat the parameter, or separate values with commas; at most 50 each) and minEmployees / maxEmployees (employees who have not left today) keep only the organisations your account owns, in name order, a full page at a time. With groupId, relationship=managed or accessType=Guest they are 400 conflicting_filters; a value that cannot hold is 400 invalid_organisation_filters.
Profile. Each row’s profile carries the PAYE and accounts office references, the registered office, the primary contact and the last completed and next open pay run, so a list can show them without opening the payroll app. It is absent when it cannot be read right now, and the page still renders.
curl --request GET \
--url https://api.sandbox.flowpayroll.ai/v1/administration/organisations \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/administration/organisations"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://api.sandbox.flowpayroll.ai/v1/administration/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://api.sandbox.flowpayroll.ai/v1/administration/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 => [
"X-Auth-Token: <api-key>"
],
]);
$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.sandbox.flowpayroll.ai/v1/administration/organisations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auth-Token", "<api-key>")
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.sandbox.flowpayroll.ai/v1/administration/organisations")
.header("X-Auth-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/administration/organisations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Auth-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": {
"organisations": [
{
"organisationId": "<string>",
"legalName": "<string>",
"tradingName": "<string>",
"organisationType": "Branch",
"employees": {
"totalEmployeeCount": 123,
"activeEmployeeCount": 123,
"leaverEmployeeCount": 123
},
"callerAccess": {
"granted": true
},
"accessType": "Customer",
"relationship": "Owned",
"managedFor": {
"customerId": "<string>",
"name": "<string>"
},
"managedBy": {
"customerId": "<string>",
"name": "<string>"
},
"payer": "Owner",
"profile": {
"payeReference": "<string>",
"accountsOfficeReference": "<string>",
"registeredOffice": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"county": "<string>",
"postcode": "<string>",
"countryCode": "<string>"
},
"primaryContact": {
"name": "<string>",
"email": "<string>",
"phone": "<string>"
},
"lastCompletedPayRun": {
"payrollConfigId": "<string>",
"frequency": "<string>",
"year": 123,
"period": 123,
"paymentDate": "<string>",
"totalEmployees": 123
},
"nextPayRun": {
"payrollConfigId": "<string>",
"frequency": "<string>",
"year": 123,
"period": 123,
"paymentDate": "<string>",
"totalEmployees": 123
},
"payrollConfigs": [
{
"payrollConfigId": "<string>",
"name": "<string>",
"payFrequency": "<string>"
}
]
},
"groups": [
{
"groupId": "<string>",
"name": "<string>"
}
],
"externalId": "<string>"
}
],
"paginationToken": "<string>"
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": "<unknown>",
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": "<unknown>",
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": "<unknown>",
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": "<unknown>",
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": "<unknown>",
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}Query Parameters
Was this page helpful?
curl --request GET \
--url https://api.sandbox.flowpayroll.ai/v1/administration/organisations \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/administration/organisations"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://api.sandbox.flowpayroll.ai/v1/administration/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://api.sandbox.flowpayroll.ai/v1/administration/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 => [
"X-Auth-Token: <api-key>"
],
]);
$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.sandbox.flowpayroll.ai/v1/administration/organisations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auth-Token", "<api-key>")
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.sandbox.flowpayroll.ai/v1/administration/organisations")
.header("X-Auth-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/administration/organisations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Auth-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": {
"organisations": [
{
"organisationId": "<string>",
"legalName": "<string>",
"tradingName": "<string>",
"organisationType": "Branch",
"employees": {
"totalEmployeeCount": 123,
"activeEmployeeCount": 123,
"leaverEmployeeCount": 123
},
"callerAccess": {
"granted": true
},
"accessType": "Customer",
"relationship": "Owned",
"managedFor": {
"customerId": "<string>",
"name": "<string>"
},
"managedBy": {
"customerId": "<string>",
"name": "<string>"
},
"payer": "Owner",
"profile": {
"payeReference": "<string>",
"accountsOfficeReference": "<string>",
"registeredOffice": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"county": "<string>",
"postcode": "<string>",
"countryCode": "<string>"
},
"primaryContact": {
"name": "<string>",
"email": "<string>",
"phone": "<string>"
},
"lastCompletedPayRun": {
"payrollConfigId": "<string>",
"frequency": "<string>",
"year": 123,
"period": 123,
"paymentDate": "<string>",
"totalEmployees": 123
},
"nextPayRun": {
"payrollConfigId": "<string>",
"frequency": "<string>",
"year": 123,
"period": 123,
"paymentDate": "<string>",
"totalEmployees": 123
},
"payrollConfigs": [
{
"payrollConfigId": "<string>",
"name": "<string>",
"payFrequency": "<string>"
}
]
},
"groups": [
{
"groupId": "<string>",
"name": "<string>"
}
],
"externalId": "<string>"
}
],
"paginationToken": "<string>"
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": "<unknown>",
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": "<unknown>",
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": "<unknown>",
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": "<unknown>",
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": "<unknown>",
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}