Close Employee
curl --request POST \
--url https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close', 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://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close",
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://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close"
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://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close")
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{
"id": "<string>",
"external_ref": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"organization_id": "<string>",
"status": {},
"core": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"employee_name": "<string>",
"gender": "M",
"marital_status": "Single",
"birth_date": "2023-12-25",
"personal_email": "jsmith@example.com",
"work_email": "jsmith@example.com",
"phone_numbers": [
{
"phone_number": "<string>",
"phone_type": "mobile",
"is_primary": false
}
]
},
"address": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"address": "<string>"
},
"job": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"start_date": "2023-12-25",
"contracted_weekly_hours": 40,
"department": "<string>",
"contracted_weekdays": [
"Monday"
],
"worker_type": "EMPLOYEE",
"director_since": "2023-12-25",
"pay_basis": "SALARIED",
"apprenticeship": {
"start_date": "2023-12-25",
"level": 4,
"expected_end_date": "2023-12-25"
},
"p45_issued": false,
"irregular_payment_pattern": false,
"ordinarily_works_in_uk": true,
"proration_basis": {
"mode": "CALENDAR_DAY",
"business_days_per_year": "<string>"
},
"end_date": "2023-12-25"
},
"tax": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"rti_id": "<string>",
"tax_code": "<string>",
"student_loan_type": "Plan1",
"postgraduate_loan": false,
"p45_gross_pay": "0.00",
"p45_tax_amount": "0.00"
},
"insurance": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"national_insurance_number": "<string>",
"nic_category": "A"
},
"compensation": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"pay_group_id": "<string>",
"earnings": [
{
"wage_type_code": "<string>",
"amount": "<string>",
"external_ref": "<string>",
"earning_type": "AMOUNT",
"earning_frequency": "MONTH",
"is_lumpsum": false,
"sacrificed_amount": "<string>"
}
],
"benefits": [
{
"wage_type_code": "<string>",
"external_ref": "<string>",
"amount": "0.00",
"make_good_amount": "0.00",
"foregone_amount": "0.00",
"cash_alternative_amount": "0.00"
}
],
"deductions": [
{
"wage_type_code": "<string>",
"amount": "<string>",
"external_ref": "<string>",
"sacrificed_amount": "<string>"
}
],
"reimbursements": [
{
"wage_type_code": "<string>",
"amount": "<string>",
"external_ref": "<string>"
}
]
},
"bank": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"accounts": [
{
"account_number": "<string>",
"sort_code": "<string>",
"financial_institution_name": "Lloyds Bank",
"is_primary": false,
"is_active": true,
"allocation_percentage": "<string>"
}
]
}
}{
"errors": [
{
"code": "HUB_NOT_FOUND",
"message": "Raised when a hub does not exist under the parent named in the path."
}
]
}{
"errors": [
{
"code": "HUB_CLOSED",
"message": "Raised on a write to a closed hub: it stays readable, its satellites take no writes."
}
]
}{
"errors": [
{
"code": "ADDRESS_NOT_FOUND",
"message": "<string>",
"field": "<string>",
"params": {}
}
]
}Employees
Close Employee
POST
/
gb
/
organizations
/
{organization_id}
/
employees
/
{employee_id}
/
close
Close Employee
curl --request POST \
--url https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close', 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://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close",
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://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close"
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://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/close")
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{
"id": "<string>",
"external_ref": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"organization_id": "<string>",
"status": {},
"core": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"employee_name": "<string>",
"gender": "M",
"marital_status": "Single",
"birth_date": "2023-12-25",
"personal_email": "jsmith@example.com",
"work_email": "jsmith@example.com",
"phone_numbers": [
{
"phone_number": "<string>",
"phone_type": "mobile",
"is_primary": false
}
]
},
"address": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"address": "<string>"
},
"job": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"start_date": "2023-12-25",
"contracted_weekly_hours": 40,
"department": "<string>",
"contracted_weekdays": [
"Monday"
],
"worker_type": "EMPLOYEE",
"director_since": "2023-12-25",
"pay_basis": "SALARIED",
"apprenticeship": {
"start_date": "2023-12-25",
"level": 4,
"expected_end_date": "2023-12-25"
},
"p45_issued": false,
"irregular_payment_pattern": false,
"ordinarily_works_in_uk": true,
"proration_basis": {
"mode": "CALENDAR_DAY",
"business_days_per_year": "<string>"
},
"end_date": "2023-12-25"
},
"tax": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"rti_id": "<string>",
"tax_code": "<string>",
"student_loan_type": "Plan1",
"postgraduate_loan": false,
"p45_gross_pay": "0.00",
"p45_tax_amount": "0.00"
},
"insurance": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"national_insurance_number": "<string>",
"nic_category": "A"
},
"compensation": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"pay_group_id": "<string>",
"earnings": [
{
"wage_type_code": "<string>",
"amount": "<string>",
"external_ref": "<string>",
"earning_type": "AMOUNT",
"earning_frequency": "MONTH",
"is_lumpsum": false,
"sacrificed_amount": "<string>"
}
],
"benefits": [
{
"wage_type_code": "<string>",
"external_ref": "<string>",
"amount": "0.00",
"make_good_amount": "0.00",
"foregone_amount": "0.00",
"cash_alternative_amount": "0.00"
}
],
"deductions": [
{
"wage_type_code": "<string>",
"amount": "<string>",
"external_ref": "<string>",
"sacrificed_amount": "<string>"
}
],
"reimbursements": [
{
"wage_type_code": "<string>",
"amount": "<string>",
"external_ref": "<string>"
}
]
},
"bank": {
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"accounts": [
{
"account_number": "<string>",
"sort_code": "<string>",
"financial_institution_name": "Lloyds Bank",
"is_primary": false,
"is_active": true,
"allocation_percentage": "<string>"
}
]
}
}{
"errors": [
{
"code": "HUB_NOT_FOUND",
"message": "Raised when a hub does not exist under the parent named in the path."
}
]
}{
"errors": [
{
"code": "HUB_CLOSED",
"message": "Raised on a write to a closed hub: it stays readable, its satellites take no writes."
}
]
}{
"errors": [
{
"code": "ADDRESS_NOT_FOUND",
"message": "<string>",
"field": "<string>",
"params": {}
}
]
}Authorizations
Get token from Auth0 and paste it here
Response
Successful Response
The employee with every satellite as it reads on one date. A satellite with no slice on an explicit date is absent.
Who created the hub: the acting user (X-Acting-User, else the access credential), system for our own writes, or <authority>:<notice> for a write on an authority's behalf, e.g. hmrc:P6.
When the hub was closed
The read-only status satellite. It carries no fields; it exists so that every
employee read has a status object.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?