Create Wage Types
curl --request POST \
--url https://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"core": {
"description": "<string>",
"name": "<string>"
},
"treatment": {
"calculation_variants": [
"<string>"
],
"deduction_tax_treatment": "POST_TAX",
"is_ae_qualifying": false,
"is_class_1a_applicable": false,
"is_gross_up": false,
"is_holiday_pay_included": false,
"is_notional": false,
"is_proratable": false,
"is_salary_sacrifice_allowed": false,
"last_reviewed_at": "2023-12-25",
"legislative_source": "<string>",
"ni_employee_applies": true,
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"owner": "<string>",
"regularity_threshold_periods": 123,
"regularity_window_weeks": 123,
"reviewer": "<string>",
"rti_payment_type": "<string>",
"thresholds": {},
"uses_ae_bands": false,
"uses_official_interest_rate": false
},
"valid_from": "2023-12-25",
"wage_type_code": "<string>",
"computation": {
"computation": {
"amount": 123,
"type": "fixed"
},
"depends_on": [
"<string>"
],
"precision": 2,
"rounding": "HALF_UP"
},
"external_ref": "<string>"
}
]
'import requests
url = "https://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list"
payload = [
{
"core": {
"description": "<string>",
"name": "<string>"
},
"treatment": {
"calculation_variants": ["<string>"],
"deduction_tax_treatment": "POST_TAX",
"is_ae_qualifying": False,
"is_class_1a_applicable": False,
"is_gross_up": False,
"is_holiday_pay_included": False,
"is_notional": False,
"is_proratable": False,
"is_salary_sacrifice_allowed": False,
"last_reviewed_at": "2023-12-25",
"legislative_source": "<string>",
"ni_employee_applies": True,
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"owner": "<string>",
"regularity_threshold_periods": 123,
"regularity_window_weeks": 123,
"reviewer": "<string>",
"rti_payment_type": "<string>",
"thresholds": {},
"uses_ae_bands": False,
"uses_official_interest_rate": False
},
"valid_from": "2023-12-25",
"wage_type_code": "<string>",
"computation": {
"computation": {
"amount": 123,
"type": "fixed"
},
"depends_on": ["<string>"],
"precision": 2,
"rounding": "HALF_UP"
},
"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: {description: '<string>', name: '<string>'},
treatment: {
calculation_variants: ['<string>'],
deduction_tax_treatment: 'POST_TAX',
is_ae_qualifying: false,
is_class_1a_applicable: false,
is_gross_up: false,
is_holiday_pay_included: false,
is_notional: false,
is_proratable: false,
is_salary_sacrifice_allowed: false,
last_reviewed_at: '2023-12-25',
legislative_source: '<string>',
ni_employee_applies: true,
nmw_treatment: 'EXCLUDED',
opra_rule: 'NOT_APPLICABLE',
owner: '<string>',
regularity_threshold_periods: 123,
regularity_window_weeks: 123,
reviewer: '<string>',
rti_payment_type: '<string>',
thresholds: {},
uses_ae_bands: false,
uses_official_interest_rate: false
},
valid_from: '2023-12-25',
wage_type_code: '<string>',
computation: {
computation: {amount: 123, type: 'fixed'},
depends_on: ['<string>'],
precision: 2,
rounding: 'HALF_UP'
},
external_ref: '<string>'
}
])
};
fetch('https://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/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://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/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' => [
'description' => '<string>',
'name' => '<string>'
],
'treatment' => [
'calculation_variants' => [
'<string>'
],
'deduction_tax_treatment' => 'POST_TAX',
'is_ae_qualifying' => false,
'is_class_1a_applicable' => false,
'is_gross_up' => false,
'is_holiday_pay_included' => false,
'is_notional' => false,
'is_proratable' => false,
'is_salary_sacrifice_allowed' => false,
'last_reviewed_at' => '2023-12-25',
'legislative_source' => '<string>',
'ni_employee_applies' => true,
'nmw_treatment' => 'EXCLUDED',
'opra_rule' => 'NOT_APPLICABLE',
'owner' => '<string>',
'regularity_threshold_periods' => 123,
'regularity_window_weeks' => 123,
'reviewer' => '<string>',
'rti_payment_type' => '<string>',
'thresholds' => [
],
'uses_ae_bands' => false,
'uses_official_interest_rate' => false
],
'valid_from' => '2023-12-25',
'wage_type_code' => '<string>',
'computation' => [
'computation' => [
'amount' => 123,
'type' => 'fixed'
],
'depends_on' => [
'<string>'
],
'precision' => 2,
'rounding' => 'HALF_UP'
],
'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://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list"
payload := strings.NewReader("[\n {\n \"core\": {\n \"description\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"treatment\": {\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"is_ae_qualifying\": false,\n \"is_class_1a_applicable\": false,\n \"is_gross_up\": false,\n \"is_holiday_pay_included\": false,\n \"is_notional\": false,\n \"is_proratable\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"last_reviewed_at\": \"2023-12-25\",\n \"legislative_source\": \"<string>\",\n \"ni_employee_applies\": true,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"owner\": \"<string>\",\n \"regularity_threshold_periods\": 123,\n \"regularity_window_weeks\": 123,\n \"reviewer\": \"<string>\",\n \"rti_payment_type\": \"<string>\",\n \"thresholds\": {},\n \"uses_ae_bands\": false,\n \"uses_official_interest_rate\": false\n },\n \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"computation\": {\n \"computation\": {\n \"amount\": 123,\n \"type\": \"fixed\"\n },\n \"depends_on\": [\n \"<string>\"\n ],\n \"precision\": 2,\n \"rounding\": \"HALF_UP\"\n },\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://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"core\": {\n \"description\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"treatment\": {\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"is_ae_qualifying\": false,\n \"is_class_1a_applicable\": false,\n \"is_gross_up\": false,\n \"is_holiday_pay_included\": false,\n \"is_notional\": false,\n \"is_proratable\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"last_reviewed_at\": \"2023-12-25\",\n \"legislative_source\": \"<string>\",\n \"ni_employee_applies\": true,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"owner\": \"<string>\",\n \"regularity_threshold_periods\": 123,\n \"regularity_window_weeks\": 123,\n \"reviewer\": \"<string>\",\n \"rti_payment_type\": \"<string>\",\n \"thresholds\": {},\n \"uses_ae_bands\": false,\n \"uses_official_interest_rate\": false\n },\n \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"computation\": {\n \"computation\": {\n \"amount\": 123,\n \"type\": \"fixed\"\n },\n \"depends_on\": [\n \"<string>\"\n ],\n \"precision\": 2,\n \"rounding\": \"HALF_UP\"\n },\n \"external_ref\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/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 \"description\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"treatment\": {\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"is_ae_qualifying\": false,\n \"is_class_1a_applicable\": false,\n \"is_gross_up\": false,\n \"is_holiday_pay_included\": false,\n \"is_notional\": false,\n \"is_proratable\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"last_reviewed_at\": \"2023-12-25\",\n \"legislative_source\": \"<string>\",\n \"ni_employee_applies\": true,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"owner\": \"<string>\",\n \"regularity_threshold_periods\": 123,\n \"regularity_window_weeks\": 123,\n \"reviewer\": \"<string>\",\n \"rti_payment_type\": \"<string>\",\n \"thresholds\": {},\n \"uses_ae_bands\": false,\n \"uses_official_interest_rate\": false\n },\n \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"computation\": {\n \"computation\": {\n \"amount\": 123,\n \"type\": \"fixed\"\n },\n \"depends_on\": [\n \"<string>\"\n ],\n \"precision\": 2,\n \"rounding\": \"HALF_UP\"\n },\n \"external_ref\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"failed": 123,
"succeeded": 123,
"total": 123,
"unprocessed": 123,
"data": [
{
"country_code": "IE",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"external_ref": "<string>",
"id": "<string>",
"organization_id": "<string>",
"system_usage": "DERIVABLE",
"wage_type_code": "<string>",
"computation": {
"computation": {
"amount": "<string>",
"type": "fixed"
},
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"depends_on": [
"<string>"
],
"locked_fields": [
"<string>"
],
"precision": 2,
"rounding": "HALF_UP"
},
"core": {
"category": "EARNINGS",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"description": "<string>",
"edition": 123,
"name": "<string>",
"valid_from": "2023-12-25",
"valid_to": "2023-12-25"
},
"lifecycle": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"state": "DRAFT",
"valid_from": "2023-12-25",
"valid_to": "2023-12-25"
},
"treatment": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"ni_class": "CLASS_1",
"p11d_reportable_status": "YES",
"payrolling_eligible_status": "YES",
"pension_status": "SCHEME_DEFINED",
"tax_timing": "ON_PAYMENT",
"taxable_status": "YES",
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"calculation_variants": [
"<string>"
],
"deduction_tax_treatment": "POST_TAX",
"is_ae_qualifying": false,
"is_class_1a_applicable": false,
"is_gross_up": false,
"is_holiday_pay_included": false,
"is_notional": false,
"is_proratable": false,
"is_salary_sacrifice_allowed": false,
"last_reviewed_at": "2023-12-25",
"legislative_source": "<string>",
"ni_employee_applies": true,
"ni_employer_treatment": "SECONDARY",
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"owner": "<string>",
"regularity_threshold_periods": 123,
"regularity_window_weeks": 123,
"reviewer": "<string>",
"rti_payment_type": "<string>",
"thresholds": {},
"uses_ae_bands": false,
"uses_official_interest_rate": false
}
}
],
"errors": [
{
"errors": [
{
"code": "HUB_DUPLICATE_EXTERNAL_REF",
"message": "<string>",
"field": "<string>",
"params": {}
}
],
"input_index": 123
}
]
}{
"errors": [
{
"code": "FIELD_REQUIRED",
"message": "<string>",
"field": "<string>",
"params": {}
}
]
}Wage Types
Create Wage Types
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, HUB_CLOSED, WAGE_TYPE_ALREADY_EXISTS, GB_WAGE_TYPE_CODE_RESERVED, GB_WAGE_TYPE_NIC_CLASS_CONFLICT, WAGE_TYPE_COMPUTATION_INVALID, WAGE_TYPE_COMPUTATION_CYCLE. A body that is not an array, is empty or holds more than 100 items is rejected with 422 and nothing is created.
POST
/
gb
/
organizations
/
{organization_id}
/
wage-types
/
list
Create Wage Types
curl --request POST \
--url https://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"core": {
"description": "<string>",
"name": "<string>"
},
"treatment": {
"calculation_variants": [
"<string>"
],
"deduction_tax_treatment": "POST_TAX",
"is_ae_qualifying": false,
"is_class_1a_applicable": false,
"is_gross_up": false,
"is_holiday_pay_included": false,
"is_notional": false,
"is_proratable": false,
"is_salary_sacrifice_allowed": false,
"last_reviewed_at": "2023-12-25",
"legislative_source": "<string>",
"ni_employee_applies": true,
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"owner": "<string>",
"regularity_threshold_periods": 123,
"regularity_window_weeks": 123,
"reviewer": "<string>",
"rti_payment_type": "<string>",
"thresholds": {},
"uses_ae_bands": false,
"uses_official_interest_rate": false
},
"valid_from": "2023-12-25",
"wage_type_code": "<string>",
"computation": {
"computation": {
"amount": 123,
"type": "fixed"
},
"depends_on": [
"<string>"
],
"precision": 2,
"rounding": "HALF_UP"
},
"external_ref": "<string>"
}
]
'import requests
url = "https://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list"
payload = [
{
"core": {
"description": "<string>",
"name": "<string>"
},
"treatment": {
"calculation_variants": ["<string>"],
"deduction_tax_treatment": "POST_TAX",
"is_ae_qualifying": False,
"is_class_1a_applicable": False,
"is_gross_up": False,
"is_holiday_pay_included": False,
"is_notional": False,
"is_proratable": False,
"is_salary_sacrifice_allowed": False,
"last_reviewed_at": "2023-12-25",
"legislative_source": "<string>",
"ni_employee_applies": True,
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"owner": "<string>",
"regularity_threshold_periods": 123,
"regularity_window_weeks": 123,
"reviewer": "<string>",
"rti_payment_type": "<string>",
"thresholds": {},
"uses_ae_bands": False,
"uses_official_interest_rate": False
},
"valid_from": "2023-12-25",
"wage_type_code": "<string>",
"computation": {
"computation": {
"amount": 123,
"type": "fixed"
},
"depends_on": ["<string>"],
"precision": 2,
"rounding": "HALF_UP"
},
"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: {description: '<string>', name: '<string>'},
treatment: {
calculation_variants: ['<string>'],
deduction_tax_treatment: 'POST_TAX',
is_ae_qualifying: false,
is_class_1a_applicable: false,
is_gross_up: false,
is_holiday_pay_included: false,
is_notional: false,
is_proratable: false,
is_salary_sacrifice_allowed: false,
last_reviewed_at: '2023-12-25',
legislative_source: '<string>',
ni_employee_applies: true,
nmw_treatment: 'EXCLUDED',
opra_rule: 'NOT_APPLICABLE',
owner: '<string>',
regularity_threshold_periods: 123,
regularity_window_weeks: 123,
reviewer: '<string>',
rti_payment_type: '<string>',
thresholds: {},
uses_ae_bands: false,
uses_official_interest_rate: false
},
valid_from: '2023-12-25',
wage_type_code: '<string>',
computation: {
computation: {amount: 123, type: 'fixed'},
depends_on: ['<string>'],
precision: 2,
rounding: 'HALF_UP'
},
external_ref: '<string>'
}
])
};
fetch('https://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/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://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/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' => [
'description' => '<string>',
'name' => '<string>'
],
'treatment' => [
'calculation_variants' => [
'<string>'
],
'deduction_tax_treatment' => 'POST_TAX',
'is_ae_qualifying' => false,
'is_class_1a_applicable' => false,
'is_gross_up' => false,
'is_holiday_pay_included' => false,
'is_notional' => false,
'is_proratable' => false,
'is_salary_sacrifice_allowed' => false,
'last_reviewed_at' => '2023-12-25',
'legislative_source' => '<string>',
'ni_employee_applies' => true,
'nmw_treatment' => 'EXCLUDED',
'opra_rule' => 'NOT_APPLICABLE',
'owner' => '<string>',
'regularity_threshold_periods' => 123,
'regularity_window_weeks' => 123,
'reviewer' => '<string>',
'rti_payment_type' => '<string>',
'thresholds' => [
],
'uses_ae_bands' => false,
'uses_official_interest_rate' => false
],
'valid_from' => '2023-12-25',
'wage_type_code' => '<string>',
'computation' => [
'computation' => [
'amount' => 123,
'type' => 'fixed'
],
'depends_on' => [
'<string>'
],
'precision' => 2,
'rounding' => 'HALF_UP'
],
'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://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list"
payload := strings.NewReader("[\n {\n \"core\": {\n \"description\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"treatment\": {\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"is_ae_qualifying\": false,\n \"is_class_1a_applicable\": false,\n \"is_gross_up\": false,\n \"is_holiday_pay_included\": false,\n \"is_notional\": false,\n \"is_proratable\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"last_reviewed_at\": \"2023-12-25\",\n \"legislative_source\": \"<string>\",\n \"ni_employee_applies\": true,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"owner\": \"<string>\",\n \"regularity_threshold_periods\": 123,\n \"regularity_window_weeks\": 123,\n \"reviewer\": \"<string>\",\n \"rti_payment_type\": \"<string>\",\n \"thresholds\": {},\n \"uses_ae_bands\": false,\n \"uses_official_interest_rate\": false\n },\n \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"computation\": {\n \"computation\": {\n \"amount\": 123,\n \"type\": \"fixed\"\n },\n \"depends_on\": [\n \"<string>\"\n ],\n \"precision\": 2,\n \"rounding\": \"HALF_UP\"\n },\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://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"core\": {\n \"description\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"treatment\": {\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"is_ae_qualifying\": false,\n \"is_class_1a_applicable\": false,\n \"is_gross_up\": false,\n \"is_holiday_pay_included\": false,\n \"is_notional\": false,\n \"is_proratable\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"last_reviewed_at\": \"2023-12-25\",\n \"legislative_source\": \"<string>\",\n \"ni_employee_applies\": true,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"owner\": \"<string>\",\n \"regularity_threshold_periods\": 123,\n \"regularity_window_weeks\": 123,\n \"reviewer\": \"<string>\",\n \"rti_payment_type\": \"<string>\",\n \"thresholds\": {},\n \"uses_ae_bands\": false,\n \"uses_official_interest_rate\": false\n },\n \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"computation\": {\n \"computation\": {\n \"amount\": 123,\n \"type\": \"fixed\"\n },\n \"depends_on\": [\n \"<string>\"\n ],\n \"precision\": 2,\n \"rounding\": \"HALF_UP\"\n },\n \"external_ref\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://preview.intermezzo.ai/gb/organizations/{organization_id}/wage-types/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 \"description\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"treatment\": {\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"is_ae_qualifying\": false,\n \"is_class_1a_applicable\": false,\n \"is_gross_up\": false,\n \"is_holiday_pay_included\": false,\n \"is_notional\": false,\n \"is_proratable\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"last_reviewed_at\": \"2023-12-25\",\n \"legislative_source\": \"<string>\",\n \"ni_employee_applies\": true,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"owner\": \"<string>\",\n \"regularity_threshold_periods\": 123,\n \"regularity_window_weeks\": 123,\n \"reviewer\": \"<string>\",\n \"rti_payment_type\": \"<string>\",\n \"thresholds\": {},\n \"uses_ae_bands\": false,\n \"uses_official_interest_rate\": false\n },\n \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"computation\": {\n \"computation\": {\n \"amount\": 123,\n \"type\": \"fixed\"\n },\n \"depends_on\": [\n \"<string>\"\n ],\n \"precision\": 2,\n \"rounding\": \"HALF_UP\"\n },\n \"external_ref\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"failed": 123,
"succeeded": 123,
"total": 123,
"unprocessed": 123,
"data": [
{
"country_code": "IE",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"external_ref": "<string>",
"id": "<string>",
"organization_id": "<string>",
"system_usage": "DERIVABLE",
"wage_type_code": "<string>",
"computation": {
"computation": {
"amount": "<string>",
"type": "fixed"
},
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"depends_on": [
"<string>"
],
"locked_fields": [
"<string>"
],
"precision": 2,
"rounding": "HALF_UP"
},
"core": {
"category": "EARNINGS",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"description": "<string>",
"edition": 123,
"name": "<string>",
"valid_from": "2023-12-25",
"valid_to": "2023-12-25"
},
"lifecycle": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"state": "DRAFT",
"valid_from": "2023-12-25",
"valid_to": "2023-12-25"
},
"treatment": {
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"ni_class": "CLASS_1",
"p11d_reportable_status": "YES",
"payrolling_eligible_status": "YES",
"pension_status": "SCHEME_DEFINED",
"tax_timing": "ON_PAYMENT",
"taxable_status": "YES",
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"calculation_variants": [
"<string>"
],
"deduction_tax_treatment": "POST_TAX",
"is_ae_qualifying": false,
"is_class_1a_applicable": false,
"is_gross_up": false,
"is_holiday_pay_included": false,
"is_notional": false,
"is_proratable": false,
"is_salary_sacrifice_allowed": false,
"last_reviewed_at": "2023-12-25",
"legislative_source": "<string>",
"ni_employee_applies": true,
"ni_employer_treatment": "SECONDARY",
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"owner": "<string>",
"regularity_threshold_periods": 123,
"regularity_window_weeks": 123,
"reviewer": "<string>",
"rti_payment_type": "<string>",
"thresholds": {},
"uses_ae_bands": false,
"uses_official_interest_rate": false
}
}
],
"errors": [
{
"errors": [
{
"code": "HUB_DUPLICATE_EXTERNAL_REF",
"message": "<string>",
"field": "<string>",
"params": {}
}
],
"input_index": 123
}
]
}{
"errors": [
{
"code": "FIELD_REQUIRED",
"message": "<string>",
"field": "<string>",
"params": {}
}
]
}Headers
Body
application/json
Required array length:
1 - 100 elementsResponse
Successful Response
Was this page helpful?