POST
/
gb
/
wage-types
/
{wage_type_code}
/
deprecate
Deprecate wage type
curl --request POST \
  --url https://dev.intermezzo.ai/gb/wage-types/{wage_type_code}/deprecate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "valid_to": "2023-12-25"
}
'
import requests

url = "https://dev.intermezzo.ai/gb/wage-types/{wage_type_code}/deprecate"

payload = { "valid_to": "2023-12-25" }
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({valid_to: '2023-12-25'})
};

fetch('https://dev.intermezzo.ai/gb/wage-types/{wage_type_code}/deprecate', 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/wage-types/{wage_type_code}/deprecate",
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([
'valid_to' => '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/wage-types/{wage_type_code}/deprecate"

payload := strings.NewReader("{\n \"valid_to\": \"2023-12-25\"\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/wage-types/{wage_type_code}/deprecate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"valid_to\": \"2023-12-25\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://dev.intermezzo.ai/gb/wage-types/{wage_type_code}/deprecate")

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 \"valid_to\": \"2023-12-25\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "wage_type_code": "<string>",
  "name": "<string>",
  "description": "<string>",
  "rti_payment_type": "<string>",
  "ni_employee_applies": true,
  "is_class_1a_applicable": true,
  "is_ae_qualifying": true,
  "uses_ae_bands": true,
  "is_holiday_pay_included": true,
  "is_salary_sacrifice_allowed": true,
  "uses_official_interest_rate": true,
  "valid_from": "2023-12-25",
  "valid_to": "2023-12-25",
  "calculation_variants": [
    "<string>"
  ],
  "thresholds": {},
  "regularity_window_weeks": 123,
  "regularity_threshold_periods": 123,
  "legislative_source": "<string>",
  "owner": "<string>",
  "reviewer": "<string>",
  "last_reviewed_at": "2023-12-25",
  "is_gross_up": false,
  "is_notional": false,
  "deduction_tax_treatment": "post_tax"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Get token from Auth0 and paste it here

Path Parameters

wage_type_code
string
required

Body

application/json

Request schema for deprecating a wage type.

valid_to
string<date>
required

Date when the wage type becomes inactive

Response

Successful Response

Response schema for GB wage type.

id
integer
required

Database ID

wage_type_code
string
required

Business key (e.g., UK-E-003)

name
string
required

Display name

category
enum<string>
required

Wage type category

Available options:
earnings,
deductions,
benefits,
statutory,
pension,
contributions,
adjustments,
reimbursements
description
string
required

Description of the wage type

status
enum<string>
required

Lifecycle status

Available options:
draft,
approved,
deprecated
taxable_status
enum<string>
required

Whether taxable under PAYE

Available options:
yes,
no,
conditional
tax_timing
enum<string>
required

When tax is applied

Available options:
on_payment,
on_accrual,
on_event
rti_payment_type
string | null
required

RTI FPS payment type mapping

ni_class
enum<string>
required

National Insurance class

Available options:
class_1,
class_1a,
none,
conditional
ni_employee_applies
boolean
required

Whether employee NI applies

ni_employer_treatment
enum<string> | null
required

Employer NI treatment

Available options:
secondary,
class_1a,
none
is_class_1a_applicable
boolean
required

Whether Class 1A NI applies

p11d_reportable_status
enum<string>
required

P11D reporting requirement

Available options:
yes,
no,
conditional
pension_status
enum<string>
required

Pension inclusion status

Available options:
scheme_defined,
yes,
no
is_ae_qualifying
boolean
required

Counts towards AE qualifying earnings

uses_ae_bands
boolean
required

Uses AE earnings bands

is_holiday_pay_included
boolean
required

Include in holiday pay calculation

is_salary_sacrifice_allowed
boolean
required

Can be salary sacrificed

nmw_treatment
enum<string>
required

NMW/NLW treatment for this wage type

Available options:
included,
excluded,
reduces,
accommodation_offset
opra_rule
enum<string>
required

Optional Remuneration Arrangement rule

Available options:
yes,
no,
n/a
payrolling_eligible_status
enum<string>
required

Can be payrolled

Available options:
yes,
no,
conditional
uses_official_interest_rate
boolean
required

Uses HMRC official interest rate

valid_from
string<date> | null
valid_to
string<date> | null
calculation_variants
string[] | null

Calculation method variants

thresholds
Thresholds · object | null

Applicable thresholds

regularity_window_weeks
integer | null

Regularity detection window in weeks

regularity_threshold_periods
integer | null

Regularity threshold periods

legislative_source
string | null

Legislative reference

owner
string | null

Responsible owner

reviewer
string | null

Compliance reviewer

last_reviewed_at
string<date> | null

Last review date

is_gross_up
boolean
default:false

Whether this wage type triggers gross-up calculation

is_notional
boolean
default:false

Non-cash notional earning (RCA/RSU)

deduction_tax_treatment
enum<string>
default:post_tax

How a deduction interacts with the tax/NIC bases

Available options:
post_tax,
payroll_giving