curl --request POST \
--url https://dev.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"valid_from": "2023-12-25",
"wage_type_code": "<string>",
"core": {
"name": "<string>",
"description": "<string>"
},
"treatment": {
"deduction_tax_treatment": "POST_TAX",
"rti_payment_type": "<string>",
"ni_employee_applies": true,
"is_class_1a_applicable": false,
"is_ae_qualifying": false,
"uses_ae_bands": false,
"is_holiday_pay_included": false,
"is_salary_sacrifice_allowed": false,
"is_proratable": false,
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"uses_official_interest_rate": false,
"calculation_variants": [
"<string>"
],
"thresholds": {},
"regularity_window_weeks": 123,
"regularity_threshold_periods": 123,
"is_gross_up": false,
"is_notional": false,
"legislative_source": "<string>",
"owner": "<string>",
"reviewer": "<string>",
"last_reviewed_at": "2023-12-25"
},
"external_ref": "<string>",
"computation": {
"computation": {
"amount": 123,
"type": "fixed"
},
"depends_on": [
"<string>"
],
"precision": 2,
"rounding": "HALF_UP"
}
}
]
'import requests
url = "https://dev.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list"
payload = [
{
"valid_from": "2023-12-25",
"wage_type_code": "<string>",
"core": {
"name": "<string>",
"description": "<string>"
},
"treatment": {
"deduction_tax_treatment": "POST_TAX",
"rti_payment_type": "<string>",
"ni_employee_applies": True,
"is_class_1a_applicable": False,
"is_ae_qualifying": False,
"uses_ae_bands": False,
"is_holiday_pay_included": False,
"is_salary_sacrifice_allowed": False,
"is_proratable": False,
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"uses_official_interest_rate": False,
"calculation_variants": ["<string>"],
"thresholds": {},
"regularity_window_weeks": 123,
"regularity_threshold_periods": 123,
"is_gross_up": False,
"is_notional": False,
"legislative_source": "<string>",
"owner": "<string>",
"reviewer": "<string>",
"last_reviewed_at": "2023-12-25"
},
"external_ref": "<string>",
"computation": {
"computation": {
"amount": 123,
"type": "fixed"
},
"depends_on": ["<string>"],
"precision": 2,
"rounding": "HALF_UP"
}
}
]
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_from: '2023-12-25',
wage_type_code: '<string>',
core: {name: '<string>', description: '<string>'},
treatment: {
deduction_tax_treatment: 'POST_TAX',
rti_payment_type: '<string>',
ni_employee_applies: true,
is_class_1a_applicable: false,
is_ae_qualifying: false,
uses_ae_bands: false,
is_holiday_pay_included: false,
is_salary_sacrifice_allowed: false,
is_proratable: false,
nmw_treatment: 'EXCLUDED',
opra_rule: 'NOT_APPLICABLE',
uses_official_interest_rate: false,
calculation_variants: ['<string>'],
thresholds: {},
regularity_window_weeks: 123,
regularity_threshold_periods: 123,
is_gross_up: false,
is_notional: false,
legislative_source: '<string>',
owner: '<string>',
reviewer: '<string>',
last_reviewed_at: '2023-12-25'
},
external_ref: '<string>',
computation: {
computation: {amount: 123, type: 'fixed'},
depends_on: ['<string>'],
precision: 2,
rounding: 'HALF_UP'
}
}
])
};
fetch('https://dev.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://dev.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([
[
'valid_from' => '2023-12-25',
'wage_type_code' => '<string>',
'core' => [
'name' => '<string>',
'description' => '<string>'
],
'treatment' => [
'deduction_tax_treatment' => 'POST_TAX',
'rti_payment_type' => '<string>',
'ni_employee_applies' => true,
'is_class_1a_applicable' => false,
'is_ae_qualifying' => false,
'uses_ae_bands' => false,
'is_holiday_pay_included' => false,
'is_salary_sacrifice_allowed' => false,
'is_proratable' => false,
'nmw_treatment' => 'EXCLUDED',
'opra_rule' => 'NOT_APPLICABLE',
'uses_official_interest_rate' => false,
'calculation_variants' => [
'<string>'
],
'thresholds' => [
],
'regularity_window_weeks' => 123,
'regularity_threshold_periods' => 123,
'is_gross_up' => false,
'is_notional' => false,
'legislative_source' => '<string>',
'owner' => '<string>',
'reviewer' => '<string>',
'last_reviewed_at' => '2023-12-25'
],
'external_ref' => '<string>',
'computation' => [
'computation' => [
'amount' => 123,
'type' => 'fixed'
],
'depends_on' => [
'<string>'
],
'precision' => 2,
'rounding' => 'HALF_UP'
]
]
]),
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}/wage-types/list"
payload := strings.NewReader("[\n {\n \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"core\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"treatment\": {\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"rti_payment_type\": \"<string>\",\n \"ni_employee_applies\": true,\n \"is_class_1a_applicable\": false,\n \"is_ae_qualifying\": false,\n \"uses_ae_bands\": false,\n \"is_holiday_pay_included\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"is_proratable\": false,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"uses_official_interest_rate\": false,\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"thresholds\": {},\n \"regularity_window_weeks\": 123,\n \"regularity_threshold_periods\": 123,\n \"is_gross_up\": false,\n \"is_notional\": false,\n \"legislative_source\": \"<string>\",\n \"owner\": \"<string>\",\n \"reviewer\": \"<string>\",\n \"last_reviewed_at\": \"2023-12-25\"\n },\n \"external_ref\": \"<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 }\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/{organization_id}/wage-types/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"core\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"treatment\": {\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"rti_payment_type\": \"<string>\",\n \"ni_employee_applies\": true,\n \"is_class_1a_applicable\": false,\n \"is_ae_qualifying\": false,\n \"uses_ae_bands\": false,\n \"is_holiday_pay_included\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"is_proratable\": false,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"uses_official_interest_rate\": false,\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"thresholds\": {},\n \"regularity_window_weeks\": 123,\n \"regularity_threshold_periods\": 123,\n \"is_gross_up\": false,\n \"is_notional\": false,\n \"legislative_source\": \"<string>\",\n \"owner\": \"<string>\",\n \"reviewer\": \"<string>\",\n \"last_reviewed_at\": \"2023-12-25\"\n },\n \"external_ref\": \"<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 }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.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 \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"core\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"treatment\": {\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"rti_payment_type\": \"<string>\",\n \"ni_employee_applies\": true,\n \"is_class_1a_applicable\": false,\n \"is_ae_qualifying\": false,\n \"uses_ae_bands\": false,\n \"is_holiday_pay_included\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"is_proratable\": false,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"uses_official_interest_rate\": false,\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"thresholds\": {},\n \"regularity_window_weeks\": 123,\n \"regularity_threshold_periods\": 123,\n \"is_gross_up\": false,\n \"is_notional\": false,\n \"legislative_source\": \"<string>\",\n \"owner\": \"<string>\",\n \"reviewer\": \"<string>\",\n \"last_reviewed_at\": \"2023-12-25\"\n },\n \"external_ref\": \"<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 }\n]"
response = http.request(request)
puts response.read_body{
"total": 123,
"succeeded": 123,
"failed": 123,
"unprocessed": 123,
"data": [
{
"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>",
"country_code": "IE",
"wage_type_code": "<string>",
"system_usage": "DERIVABLE",
"core": {
"name": "<string>",
"description": "<string>",
"category": "EARNINGS",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>"
},
"treatment": {
"taxable_status": "YES",
"tax_timing": "ON_PAYMENT",
"ni_class": "CLASS_1",
"p11d_reportable_status": "YES",
"pension_status": "SCHEME_DEFINED",
"payrolling_eligible_status": "YES",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"deduction_tax_treatment": "POST_TAX",
"rti_payment_type": "<string>",
"ni_employee_applies": true,
"ni_employer_treatment": "SECONDARY",
"is_class_1a_applicable": false,
"is_ae_qualifying": false,
"uses_ae_bands": false,
"is_holiday_pay_included": false,
"is_salary_sacrifice_allowed": false,
"is_proratable": false,
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"uses_official_interest_rate": false,
"calculation_variants": [
"<string>"
],
"thresholds": {},
"regularity_window_weeks": 123,
"regularity_threshold_periods": 123,
"is_gross_up": false,
"is_notional": false,
"legislative_source": "<string>",
"owner": "<string>",
"reviewer": "<string>",
"last_reviewed_at": "2023-12-25"
},
"lifecycle": {
"state": "DRAFT",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>"
},
"computation": {
"computation": {
"amount": "<string>",
"type": "fixed"
},
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"depends_on": [
"<string>"
],
"precision": 2,
"rounding": "HALF_UP",
"locked_fields": [
"<string>"
]
}
}
],
"errors": [
{
"input_index": 123,
"errors": [
{
"code": "HUB_DUPLICATE_EXTERNAL_REF",
"message": "<string>",
"field": "<string>",
"params": {}
}
]
}
]
}{
"errors": [
{
"code": "FIELD_REQUIRED",
"message": "<string>",
"field": "<string>",
"params": {}
}
]
}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, 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.
curl --request POST \
--url https://dev.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"valid_from": "2023-12-25",
"wage_type_code": "<string>",
"core": {
"name": "<string>",
"description": "<string>"
},
"treatment": {
"deduction_tax_treatment": "POST_TAX",
"rti_payment_type": "<string>",
"ni_employee_applies": true,
"is_class_1a_applicable": false,
"is_ae_qualifying": false,
"uses_ae_bands": false,
"is_holiday_pay_included": false,
"is_salary_sacrifice_allowed": false,
"is_proratable": false,
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"uses_official_interest_rate": false,
"calculation_variants": [
"<string>"
],
"thresholds": {},
"regularity_window_weeks": 123,
"regularity_threshold_periods": 123,
"is_gross_up": false,
"is_notional": false,
"legislative_source": "<string>",
"owner": "<string>",
"reviewer": "<string>",
"last_reviewed_at": "2023-12-25"
},
"external_ref": "<string>",
"computation": {
"computation": {
"amount": 123,
"type": "fixed"
},
"depends_on": [
"<string>"
],
"precision": 2,
"rounding": "HALF_UP"
}
}
]
'import requests
url = "https://dev.intermezzo.ai/gb/organizations/{organization_id}/wage-types/list"
payload = [
{
"valid_from": "2023-12-25",
"wage_type_code": "<string>",
"core": {
"name": "<string>",
"description": "<string>"
},
"treatment": {
"deduction_tax_treatment": "POST_TAX",
"rti_payment_type": "<string>",
"ni_employee_applies": True,
"is_class_1a_applicable": False,
"is_ae_qualifying": False,
"uses_ae_bands": False,
"is_holiday_pay_included": False,
"is_salary_sacrifice_allowed": False,
"is_proratable": False,
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"uses_official_interest_rate": False,
"calculation_variants": ["<string>"],
"thresholds": {},
"regularity_window_weeks": 123,
"regularity_threshold_periods": 123,
"is_gross_up": False,
"is_notional": False,
"legislative_source": "<string>",
"owner": "<string>",
"reviewer": "<string>",
"last_reviewed_at": "2023-12-25"
},
"external_ref": "<string>",
"computation": {
"computation": {
"amount": 123,
"type": "fixed"
},
"depends_on": ["<string>"],
"precision": 2,
"rounding": "HALF_UP"
}
}
]
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_from: '2023-12-25',
wage_type_code: '<string>',
core: {name: '<string>', description: '<string>'},
treatment: {
deduction_tax_treatment: 'POST_TAX',
rti_payment_type: '<string>',
ni_employee_applies: true,
is_class_1a_applicable: false,
is_ae_qualifying: false,
uses_ae_bands: false,
is_holiday_pay_included: false,
is_salary_sacrifice_allowed: false,
is_proratable: false,
nmw_treatment: 'EXCLUDED',
opra_rule: 'NOT_APPLICABLE',
uses_official_interest_rate: false,
calculation_variants: ['<string>'],
thresholds: {},
regularity_window_weeks: 123,
regularity_threshold_periods: 123,
is_gross_up: false,
is_notional: false,
legislative_source: '<string>',
owner: '<string>',
reviewer: '<string>',
last_reviewed_at: '2023-12-25'
},
external_ref: '<string>',
computation: {
computation: {amount: 123, type: 'fixed'},
depends_on: ['<string>'],
precision: 2,
rounding: 'HALF_UP'
}
}
])
};
fetch('https://dev.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://dev.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([
[
'valid_from' => '2023-12-25',
'wage_type_code' => '<string>',
'core' => [
'name' => '<string>',
'description' => '<string>'
],
'treatment' => [
'deduction_tax_treatment' => 'POST_TAX',
'rti_payment_type' => '<string>',
'ni_employee_applies' => true,
'is_class_1a_applicable' => false,
'is_ae_qualifying' => false,
'uses_ae_bands' => false,
'is_holiday_pay_included' => false,
'is_salary_sacrifice_allowed' => false,
'is_proratable' => false,
'nmw_treatment' => 'EXCLUDED',
'opra_rule' => 'NOT_APPLICABLE',
'uses_official_interest_rate' => false,
'calculation_variants' => [
'<string>'
],
'thresholds' => [
],
'regularity_window_weeks' => 123,
'regularity_threshold_periods' => 123,
'is_gross_up' => false,
'is_notional' => false,
'legislative_source' => '<string>',
'owner' => '<string>',
'reviewer' => '<string>',
'last_reviewed_at' => '2023-12-25'
],
'external_ref' => '<string>',
'computation' => [
'computation' => [
'amount' => 123,
'type' => 'fixed'
],
'depends_on' => [
'<string>'
],
'precision' => 2,
'rounding' => 'HALF_UP'
]
]
]),
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}/wage-types/list"
payload := strings.NewReader("[\n {\n \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"core\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"treatment\": {\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"rti_payment_type\": \"<string>\",\n \"ni_employee_applies\": true,\n \"is_class_1a_applicable\": false,\n \"is_ae_qualifying\": false,\n \"uses_ae_bands\": false,\n \"is_holiday_pay_included\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"is_proratable\": false,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"uses_official_interest_rate\": false,\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"thresholds\": {},\n \"regularity_window_weeks\": 123,\n \"regularity_threshold_periods\": 123,\n \"is_gross_up\": false,\n \"is_notional\": false,\n \"legislative_source\": \"<string>\",\n \"owner\": \"<string>\",\n \"reviewer\": \"<string>\",\n \"last_reviewed_at\": \"2023-12-25\"\n },\n \"external_ref\": \"<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 }\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/{organization_id}/wage-types/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"core\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"treatment\": {\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"rti_payment_type\": \"<string>\",\n \"ni_employee_applies\": true,\n \"is_class_1a_applicable\": false,\n \"is_ae_qualifying\": false,\n \"uses_ae_bands\": false,\n \"is_holiday_pay_included\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"is_proratable\": false,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"uses_official_interest_rate\": false,\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"thresholds\": {},\n \"regularity_window_weeks\": 123,\n \"regularity_threshold_periods\": 123,\n \"is_gross_up\": false,\n \"is_notional\": false,\n \"legislative_source\": \"<string>\",\n \"owner\": \"<string>\",\n \"reviewer\": \"<string>\",\n \"last_reviewed_at\": \"2023-12-25\"\n },\n \"external_ref\": \"<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 }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.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 \"valid_from\": \"2023-12-25\",\n \"wage_type_code\": \"<string>\",\n \"core\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"treatment\": {\n \"deduction_tax_treatment\": \"POST_TAX\",\n \"rti_payment_type\": \"<string>\",\n \"ni_employee_applies\": true,\n \"is_class_1a_applicable\": false,\n \"is_ae_qualifying\": false,\n \"uses_ae_bands\": false,\n \"is_holiday_pay_included\": false,\n \"is_salary_sacrifice_allowed\": false,\n \"is_proratable\": false,\n \"nmw_treatment\": \"EXCLUDED\",\n \"opra_rule\": \"NOT_APPLICABLE\",\n \"uses_official_interest_rate\": false,\n \"calculation_variants\": [\n \"<string>\"\n ],\n \"thresholds\": {},\n \"regularity_window_weeks\": 123,\n \"regularity_threshold_periods\": 123,\n \"is_gross_up\": false,\n \"is_notional\": false,\n \"legislative_source\": \"<string>\",\n \"owner\": \"<string>\",\n \"reviewer\": \"<string>\",\n \"last_reviewed_at\": \"2023-12-25\"\n },\n \"external_ref\": \"<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 }\n]"
response = http.request(request)
puts response.read_body{
"total": 123,
"succeeded": 123,
"failed": 123,
"unprocessed": 123,
"data": [
{
"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>",
"country_code": "IE",
"wage_type_code": "<string>",
"system_usage": "DERIVABLE",
"core": {
"name": "<string>",
"description": "<string>",
"category": "EARNINGS",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>"
},
"treatment": {
"taxable_status": "YES",
"tax_timing": "ON_PAYMENT",
"ni_class": "CLASS_1",
"p11d_reportable_status": "YES",
"pension_status": "SCHEME_DEFINED",
"payrolling_eligible_status": "YES",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"deduction_tax_treatment": "POST_TAX",
"rti_payment_type": "<string>",
"ni_employee_applies": true,
"ni_employer_treatment": "SECONDARY",
"is_class_1a_applicable": false,
"is_ae_qualifying": false,
"uses_ae_bands": false,
"is_holiday_pay_included": false,
"is_salary_sacrifice_allowed": false,
"is_proratable": false,
"nmw_treatment": "EXCLUDED",
"opra_rule": "NOT_APPLICABLE",
"uses_official_interest_rate": false,
"calculation_variants": [
"<string>"
],
"thresholds": {},
"regularity_window_weeks": 123,
"regularity_threshold_periods": 123,
"is_gross_up": false,
"is_notional": false,
"legislative_source": "<string>",
"owner": "<string>",
"reviewer": "<string>",
"last_reviewed_at": "2023-12-25"
},
"lifecycle": {
"state": "DRAFT",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>"
},
"computation": {
"computation": {
"amount": "<string>",
"type": "fixed"
},
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"depends_on": [
"<string>"
],
"precision": 2,
"rounding": "HALF_UP",
"locked_fields": [
"<string>"
]
}
}
],
"errors": [
{
"input_index": 123,
"errors": [
{
"code": "HUB_DUPLICATE_EXTERNAL_REF",
"message": "<string>",
"field": "<string>",
"params": {}
}
]
}
]
}{
"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 - 255Path Parameters
Body
1 - 100 elementsThe first day every satellite's data is valid at
Business key, unique within the organization; not in the UK- namespace
What the wage type is called and which block of the payslip it belongs to.
Show child attributes
Show child attributes
The statutory treatment of amounts paid under the code.
Show child attributes
Show child attributes
The integrator's own stable key, unique within the organization
1 - 255How the amount paid under the code is computed: a wagekit spec, the codes it reads, and how its result is rounded.
Show child attributes
Show child attributes
Response
Successful Response
Total number of records in the request
Number of successfully processed records
Number of failed records
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