curl --request POST \
--url https://dev.intermezzo.ai/gb/organizations/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"core": {
"dba_name": "Acme",
"incorporation_date": "2023-12-25",
"legal_name": "Acme Trading Ltd",
"logo_id": "<string>",
"shutdown_date": "2023-12-25",
"website": "https://acme.example/"
},
"valid_from": "2023-12-25",
"external_ref": "<string>"
}
]
'import requests
url = "https://dev.intermezzo.ai/gb/organizations/list"
payload = [
{
"core": {
"dba_name": "Acme",
"incorporation_date": "2023-12-25",
"legal_name": "Acme Trading Ltd",
"logo_id": "<string>",
"shutdown_date": "2023-12-25",
"website": "https://acme.example/"
},
"valid_from": "2023-12-25",
"external_ref": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
core: {
dba_name: 'Acme',
incorporation_date: '2023-12-25',
legal_name: 'Acme Trading Ltd',
logo_id: '<string>',
shutdown_date: '2023-12-25',
website: 'https://acme.example/'
},
valid_from: '2023-12-25',
external_ref: '<string>'
}
])
};
fetch('https://dev.intermezzo.ai/gb/organizations/list', 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://dev.intermezzo.ai/gb/organizations/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'core' => [
'dba_name' => 'Acme',
'incorporation_date' => '2023-12-25',
'legal_name' => 'Acme Trading Ltd',
'logo_id' => '<string>',
'shutdown_date' => '2023-12-25',
'website' => 'https://acme.example/'
],
'valid_from' => '2023-12-25',
'external_ref' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dev.intermezzo.ai/gb/organizations/list"
payload := strings.NewReader("[\n {\n \"core\": {\n \"dba_name\": \"Acme\",\n \"incorporation_date\": \"2023-12-25\",\n \"legal_name\": \"Acme Trading Ltd\",\n \"logo_id\": \"<string>\",\n \"shutdown_date\": \"2023-12-25\",\n \"website\": \"https://acme.example/\"\n },\n \"valid_from\": \"2023-12-25\",\n \"external_ref\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dev.intermezzo.ai/gb/organizations/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"core\": {\n \"dba_name\": \"Acme\",\n \"incorporation_date\": \"2023-12-25\",\n \"legal_name\": \"Acme Trading Ltd\",\n \"logo_id\": \"<string>\",\n \"shutdown_date\": \"2023-12-25\",\n \"website\": \"https://acme.example/\"\n },\n \"valid_from\": \"2023-12-25\",\n \"external_ref\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.intermezzo.ai/gb/organizations/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"core\": {\n \"dba_name\": \"Acme\",\n \"incorporation_date\": \"2023-12-25\",\n \"legal_name\": \"Acme Trading Ltd\",\n \"logo_id\": \"<string>\",\n \"shutdown_date\": \"2023-12-25\",\n \"website\": \"https://acme.example/\"\n },\n \"valid_from\": \"2023-12-25\",\n \"external_ref\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"failed": 123,
"succeeded": 123,
"total": 123,
"unprocessed": 123,
"data": [
{
"client_id": "<string>",
"country_code": "GB",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"external_ref": "<string>",
"id": "<string>",
"status": {},
"address": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"address": "<string>",
"correspondence_address": "<string>"
},
"bank": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"accounts": [
{
"account_number": "<string>",
"financial_institution_name": "<string>",
"is_active": true,
"is_primary": false,
"sort_code": "<string>"
}
],
"bacs_service_user_number": "<string>"
},
"contact": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"contacts": [
{
"name": "Jane Smith",
"email": "<string>",
"is_primary": false,
"phone": {
"phone_number": "<string>",
"phone_type": "MOBILE"
},
"roles": [
"<string>"
]
}
],
"hmrc_sender_email": "<string>"
},
"core": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"dba_name": "<string>",
"incorporation_date": "2023-12-25",
"legal_name": "<string>",
"logo_id": "<string>",
"shutdown_date": "2023-12-25",
"website": "<string>"
},
"insurance": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"employment_allowance_eligible": false
},
"tax": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"accounts_office_reference": "<string>",
"corporation_tax_reference": "<string>",
"paye_reference_number": "<string>"
}
}
],
"errors": [
{
"errors": [
{
"code": "HUB_DUPLICATE_EXTERNAL_REF",
"message": "<string>",
"field": "<string>",
"params": {}
}
],
"input_index": 123
}
]
}{
"errors": [
{
"code": "FIELD_REQUIRED",
"message": "<string>",
"field": "<string>",
"params": {}
}
]
}Create Organizations
Each item is validated and created on its own: an item that fails is reported in errors with its index, and the others are still created. The response is 200 however many items fail. Item errors carry the validation codes of the single create, with field relative to the item, and its codes: HUB_DUPLICATE_EXTERNAL_REF. A body that is not an array, is empty or holds more than 100 items is rejected with 422 and nothing is created.
curl --request POST \
--url https://dev.intermezzo.ai/gb/organizations/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"core": {
"dba_name": "Acme",
"incorporation_date": "2023-12-25",
"legal_name": "Acme Trading Ltd",
"logo_id": "<string>",
"shutdown_date": "2023-12-25",
"website": "https://acme.example/"
},
"valid_from": "2023-12-25",
"external_ref": "<string>"
}
]
'import requests
url = "https://dev.intermezzo.ai/gb/organizations/list"
payload = [
{
"core": {
"dba_name": "Acme",
"incorporation_date": "2023-12-25",
"legal_name": "Acme Trading Ltd",
"logo_id": "<string>",
"shutdown_date": "2023-12-25",
"website": "https://acme.example/"
},
"valid_from": "2023-12-25",
"external_ref": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
core: {
dba_name: 'Acme',
incorporation_date: '2023-12-25',
legal_name: 'Acme Trading Ltd',
logo_id: '<string>',
shutdown_date: '2023-12-25',
website: 'https://acme.example/'
},
valid_from: '2023-12-25',
external_ref: '<string>'
}
])
};
fetch('https://dev.intermezzo.ai/gb/organizations/list', 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://dev.intermezzo.ai/gb/organizations/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'core' => [
'dba_name' => 'Acme',
'incorporation_date' => '2023-12-25',
'legal_name' => 'Acme Trading Ltd',
'logo_id' => '<string>',
'shutdown_date' => '2023-12-25',
'website' => 'https://acme.example/'
],
'valid_from' => '2023-12-25',
'external_ref' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dev.intermezzo.ai/gb/organizations/list"
payload := strings.NewReader("[\n {\n \"core\": {\n \"dba_name\": \"Acme\",\n \"incorporation_date\": \"2023-12-25\",\n \"legal_name\": \"Acme Trading Ltd\",\n \"logo_id\": \"<string>\",\n \"shutdown_date\": \"2023-12-25\",\n \"website\": \"https://acme.example/\"\n },\n \"valid_from\": \"2023-12-25\",\n \"external_ref\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dev.intermezzo.ai/gb/organizations/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"core\": {\n \"dba_name\": \"Acme\",\n \"incorporation_date\": \"2023-12-25\",\n \"legal_name\": \"Acme Trading Ltd\",\n \"logo_id\": \"<string>\",\n \"shutdown_date\": \"2023-12-25\",\n \"website\": \"https://acme.example/\"\n },\n \"valid_from\": \"2023-12-25\",\n \"external_ref\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.intermezzo.ai/gb/organizations/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"core\": {\n \"dba_name\": \"Acme\",\n \"incorporation_date\": \"2023-12-25\",\n \"legal_name\": \"Acme Trading Ltd\",\n \"logo_id\": \"<string>\",\n \"shutdown_date\": \"2023-12-25\",\n \"website\": \"https://acme.example/\"\n },\n \"valid_from\": \"2023-12-25\",\n \"external_ref\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"failed": 123,
"succeeded": 123,
"total": 123,
"unprocessed": 123,
"data": [
{
"client_id": "<string>",
"country_code": "GB",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"external_ref": "<string>",
"id": "<string>",
"status": {},
"address": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"address": "<string>",
"correspondence_address": "<string>"
},
"bank": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"accounts": [
{
"account_number": "<string>",
"financial_institution_name": "<string>",
"is_active": true,
"is_primary": false,
"sort_code": "<string>"
}
],
"bacs_service_user_number": "<string>"
},
"contact": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"contacts": [
{
"name": "Jane Smith",
"email": "<string>",
"is_primary": false,
"phone": {
"phone_number": "<string>",
"phone_type": "MOBILE"
},
"roles": [
"<string>"
]
}
],
"hmrc_sender_email": "<string>"
},
"core": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"dba_name": "<string>",
"incorporation_date": "2023-12-25",
"legal_name": "<string>",
"logo_id": "<string>",
"shutdown_date": "2023-12-25",
"website": "<string>"
},
"insurance": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"employment_allowance_eligible": false
},
"tax": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"accounts_office_reference": "<string>",
"corporation_tax_reference": "<string>",
"paye_reference_number": "<string>"
}
}
],
"errors": [
{
"errors": [
{
"code": "HUB_DUPLICATE_EXTERNAL_REF",
"message": "<string>",
"field": "<string>",
"params": {}
}
],
"input_index": 123
}
]
}{
"errors": [
{
"code": "FIELD_REQUIRED",
"message": "<string>",
"field": "<string>",
"params": {}
}
]
}Authorizations
Get token from Auth0 and paste it here
Headers
The person acting through the access credential, recorded as created_by of what the request writes. Audit only: access is checked on the credential.
1 - 255Body
1 - 100 elementsShow child attributes
Show child attributes
The first day every satellite's data is valid at
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The integrator's own stable key, unique within the hub's parent: the organization for an employee, the access credential for an organization. Generated when absent.
1 - 255Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful Response
Number of failed records
Number of successfully processed records
Total number of records in the request
Number of records that passed validation but were not processed
Successfully processed records
Show child attributes
Show child attributes
Failed records with error details
Show child attributes
Show child attributes