PATCH
/
gb
/
organizations
/
{organization_id}
/
employees
/
{employee_id}
/
pension
/
rates
Update per-employee pension rates
curl --request PATCH \
  --url https://dev.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/pension/rates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "valid_from": "2023-12-25"
}
'
import requests

url = "https://dev.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/pension/rates"

payload = { "valid_from": "2023-12-25" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({valid_from: '2023-12-25'})
};

fetch('https://dev.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/pension/rates', 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/{organization_id}/employees/{employee_id}/pension/rates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'valid_from' => '2023-12-25'
]),
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/{organization_id}/employees/{employee_id}/pension/rates"

payload := strings.NewReader("{\n \"valid_from\": \"2023-12-25\"\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://dev.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/pension/rates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"valid_from\": \"2023-12-25\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://dev.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/pension/rates")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"valid_from\": \"2023-12-25\"\n}"

response = http.request(request)
puts response.read_body
{
  "valid_from": "2023-12-25",
  "version": 123,
  "enrolment_date": "2023-12-25",
  "opt_out_date": "2023-12-25",
  "enrolment_communication_date": "2023-12-25",
  "scheme_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "valid_to": "2023-12-25",
  "employee_rate": "<string>",
  "employer_rate": "<string>",
  "employee_cap": "<string>",
  "employer_cap": "<string>",
  "wage_type_code": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Get token from Auth0 and paste it here

Path Parameters

organization_id
required
employee_id
required

Body

application/json

Request to update per-employee pension contribution rates.

Creates a new membership history version effective from valid_from. Standard PATCH semantics:

  • Field omitted from the request body → carry forward the current value unchanged.
  • Field explicitly set to null → clear the override (fall back to scheme default).
  • Field set to a value → apply as the new override.
valid_from
string<date>
required

Effective date of the rate change

employee_rate

Employee contribution rate override

Required range: 0 <= x <= 1
employer_rate

Employer contribution rate override

Required range: 0 <= x <= 1
employee_cap

Per-period employee contribution cap override

Required range: x >= 0
employer_cap

Per-period employer contribution cap override

Required range: x >= 0
tax_treatment
enum<string> | null

Per-employee tax treatment override

Available options:
NET_PAY,
RELIEF_AT_SOURCE,
SALARY_SACRIFICE
wage_type_code
string | null

Wage type code; MUST be provided when tax_treatment is set

Response

Successful Response

Current pension membership state for an employee.

Reflects the latest (highest version) membership history record. Per-employee rate override fields (employee_rate, employer_rate, etc.) are null when the scheme defaults apply; non-null values take precedence over the scheme.

valid_from
string<date>
required

Date from which this version of the membership record is effective

status
enum<string>
required

Current membership status: ACTIVE (enrolled, contributions calculated), OPTED_OUT (left the scheme; contributions refunded if within 1-month opt-out window), NOT_ENROLLED (no active membership)

Available options:
ACTIVE,
OPTED_OUT,
NOT_ENROLLED
version
integer
required

Sequential version number of this membership record; starts at 0, incremented on each change (status change, rate update, etc.)

worker_category
enum<string> | null
required

AE worker category at enrolment time: ELIGIBLE_JOBHOLDER (age 22–SPA, earnings ≥ trigger — employer must enrol), NON_ELIGIBLE_JOBHOLDER (outside age/earnings band — can opt in), ENTITLED_WORKER (earnings below lower limit — can join, employer need not contribute), EXCLUDED (not subject to AE). Null if not yet enrolled

Available options:
ELIGIBLE_JOBHOLDER,
NON_ELIGIBLE_JOBHOLDER,
ENTITLED_WORKER,
EXCLUDED
entry_route
enum<string> | null
required

How the employee entered the scheme: AUTO_ENROLLED (system enrolled automatically at payroll approval), OPTED_IN (employee requested enrolment), JOINED (entitled worker chose to join). Null if not enrolled

Available options:
AUTO_ENROLLED,
OPTED_IN,
JOINED
enrolment_date
string<date> | null
required

Date on which the membership became ACTIVE; null if not yet enrolled

opt_out_date
string<date> | null
required

Date the employee opted out; null if not opted out

enrolment_communication_date
string<date> | null
required

Date the statutory enrolment letter was issued to the employee; used to validate the 1-month opt-out window

scheme_id
string | null
required

UUID of the pension scheme the employee is enrolled in; null for legacy memberships created before multi-scheme support (engine falls back to the org's default scheme)

created_at
string<date-time>
required

Timestamp when this version of the membership record was created

created_by
string | null
required

User identifier who created this version; null if created by the system (e.g. auto-enrolment)

valid_to
string<date> | null

Date on which this version expires (exclusive); null = current version. Set automatically when a new version is created

employee_rate
string | null

Per-employee employee contribution rate override; null = use scheme default

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
employer_rate
string | null

Per-employee employer contribution rate override; null = use scheme default

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
employee_cap
string | null

Per-employee maximum employee contribution per period; null = use scheme default

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
employer_cap
string | null

Per-employee maximum employer contribution per period; null = use scheme default

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
tax_treatment
enum<string> | null

Per-employee tax treatment override (e.g. RELIEF_AT_SOURCE for an employee whose scheme is SALARY_SACRIFICE); null = use scheme default

Available options:
NET_PAY,
RELIEF_AT_SOURCE,
SALARY_SACRIFICE
wage_type_code
string | null

Per-employee wage type code override for the payslip deduction line; null = use scheme default. Required when tax_treatment override is set