Create Compensation Edition
curl --request PUT \
--url https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"benefits": [
{
"amount": "0.00",
"cash_alternative_amount": "0.00",
"external_ref": "<string>",
"foregone_amount": "0.00",
"make_good_amount": "0.00",
"wage_type_code": "<string>"
}
],
"deductions": [
{
"amount": 1,
"external_ref": "<string>",
"sacrificed_amount": 1,
"wage_type_code": "<string>"
}
],
"earnings": [
{
"amount": 123,
"earning_frequency": "MONTH",
"earning_type": "AMOUNT",
"external_ref": "<string>",
"is_lumpsum": false,
"sacrificed_amount": 1,
"wage_type_code": "<string>"
}
],
"reimbursements": [
{
"amount": 1,
"external_ref": "<string>",
"wage_type_code": "<string>"
}
],
"valid_from": "2023-12-25",
"valid_to": "2023-12-25"
}
'import requests
url = "https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation"
payload = {
"benefits": [
{
"amount": "0.00",
"cash_alternative_amount": "0.00",
"external_ref": "<string>",
"foregone_amount": "0.00",
"make_good_amount": "0.00",
"wage_type_code": "<string>"
}
],
"deductions": [
{
"amount": 1,
"external_ref": "<string>",
"sacrificed_amount": 1,
"wage_type_code": "<string>"
}
],
"earnings": [
{
"amount": 123,
"earning_frequency": "MONTH",
"earning_type": "AMOUNT",
"external_ref": "<string>",
"is_lumpsum": False,
"sacrificed_amount": 1,
"wage_type_code": "<string>"
}
],
"reimbursements": [
{
"amount": 1,
"external_ref": "<string>",
"wage_type_code": "<string>"
}
],
"valid_from": "2023-12-25",
"valid_to": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
benefits: [
{
amount: '0.00',
cash_alternative_amount: '0.00',
external_ref: '<string>',
foregone_amount: '0.00',
make_good_amount: '0.00',
wage_type_code: '<string>'
}
],
deductions: [
{
amount: 1,
external_ref: '<string>',
sacrificed_amount: 1,
wage_type_code: '<string>'
}
],
earnings: [
{
amount: 123,
earning_frequency: 'MONTH',
earning_type: 'AMOUNT',
external_ref: '<string>',
is_lumpsum: false,
sacrificed_amount: 1,
wage_type_code: '<string>'
}
],
reimbursements: [{amount: 1, external_ref: '<string>', wage_type_code: '<string>'}],
valid_from: '2023-12-25',
valid_to: '2023-12-25'
})
};
fetch('https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation', 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}/compensation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'benefits' => [
[
'amount' => '0.00',
'cash_alternative_amount' => '0.00',
'external_ref' => '<string>',
'foregone_amount' => '0.00',
'make_good_amount' => '0.00',
'wage_type_code' => '<string>'
]
],
'deductions' => [
[
'amount' => 1,
'external_ref' => '<string>',
'sacrificed_amount' => 1,
'wage_type_code' => '<string>'
]
],
'earnings' => [
[
'amount' => 123,
'earning_frequency' => 'MONTH',
'earning_type' => 'AMOUNT',
'external_ref' => '<string>',
'is_lumpsum' => false,
'sacrificed_amount' => 1,
'wage_type_code' => '<string>'
]
],
'reimbursements' => [
[
'amount' => 1,
'external_ref' => '<string>',
'wage_type_code' => '<string>'
]
],
'valid_from' => '2023-12-25',
'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://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation"
payload := strings.NewReader("{\n \"benefits\": [\n {\n \"amount\": \"0.00\",\n \"cash_alternative_amount\": \"0.00\",\n \"external_ref\": \"<string>\",\n \"foregone_amount\": \"0.00\",\n \"make_good_amount\": \"0.00\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"deductions\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"earnings\": [\n {\n \"amount\": 123,\n \"earning_frequency\": \"MONTH\",\n \"earning_type\": \"AMOUNT\",\n \"external_ref\": \"<string>\",\n \"is_lumpsum\": false,\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"reimbursements\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"benefits\": [\n {\n \"amount\": \"0.00\",\n \"cash_alternative_amount\": \"0.00\",\n \"external_ref\": \"<string>\",\n \"foregone_amount\": \"0.00\",\n \"make_good_amount\": \"0.00\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"deductions\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"earnings\": [\n {\n \"amount\": 123,\n \"earning_frequency\": \"MONTH\",\n \"earning_type\": \"AMOUNT\",\n \"external_ref\": \"<string>\",\n \"is_lumpsum\": false,\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"reimbursements\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"benefits\": [\n {\n \"amount\": \"0.00\",\n \"cash_alternative_amount\": \"0.00\",\n \"external_ref\": \"<string>\",\n \"foregone_amount\": \"0.00\",\n \"make_good_amount\": \"0.00\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"deductions\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"earnings\": [\n {\n \"amount\": 123,\n \"earning_frequency\": \"MONTH\",\n \"earning_type\": \"AMOUNT\",\n \"external_ref\": \"<string>\",\n \"is_lumpsum\": false,\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"reimbursements\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"benefits": [
{
"wage_type_code": "<string>",
"amount": "0.00",
"cash_alternative_amount": "0.00",
"external_ref": "<string>",
"foregone_amount": "0.00",
"make_good_amount": "0.00"
}
],
"deductions": [
{
"amount": "<string>",
"wage_type_code": "<string>",
"external_ref": "<string>",
"sacrificed_amount": "<string>"
}
],
"earnings": [
{
"amount": "<string>",
"wage_type_code": "<string>",
"earning_frequency": "MONTH",
"earning_type": "AMOUNT",
"external_ref": "<string>",
"is_lumpsum": false,
"sacrificed_amount": "<string>"
}
],
"reimbursements": [
{
"amount": "<string>",
"wage_type_code": "<string>",
"external_ref": "<string>"
}
]
}Compensation
Create Compensation Edition
If-Match carries the edition of the slice the range starts in, as read. A satellite not yet written is created by a PUT with If-None-Match: * instead, on a range that runs to 9999-12-31. The response’s ETag is the edition written.
PUT
/
gb
/
organizations
/
{organization_id}
/
employees
/
{employee_id}
/
compensation
Create Compensation Edition
curl --request PUT \
--url https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"benefits": [
{
"amount": "0.00",
"cash_alternative_amount": "0.00",
"external_ref": "<string>",
"foregone_amount": "0.00",
"make_good_amount": "0.00",
"wage_type_code": "<string>"
}
],
"deductions": [
{
"amount": 1,
"external_ref": "<string>",
"sacrificed_amount": 1,
"wage_type_code": "<string>"
}
],
"earnings": [
{
"amount": 123,
"earning_frequency": "MONTH",
"earning_type": "AMOUNT",
"external_ref": "<string>",
"is_lumpsum": false,
"sacrificed_amount": 1,
"wage_type_code": "<string>"
}
],
"reimbursements": [
{
"amount": 1,
"external_ref": "<string>",
"wage_type_code": "<string>"
}
],
"valid_from": "2023-12-25",
"valid_to": "2023-12-25"
}
'import requests
url = "https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation"
payload = {
"benefits": [
{
"amount": "0.00",
"cash_alternative_amount": "0.00",
"external_ref": "<string>",
"foregone_amount": "0.00",
"make_good_amount": "0.00",
"wage_type_code": "<string>"
}
],
"deductions": [
{
"amount": 1,
"external_ref": "<string>",
"sacrificed_amount": 1,
"wage_type_code": "<string>"
}
],
"earnings": [
{
"amount": 123,
"earning_frequency": "MONTH",
"earning_type": "AMOUNT",
"external_ref": "<string>",
"is_lumpsum": False,
"sacrificed_amount": 1,
"wage_type_code": "<string>"
}
],
"reimbursements": [
{
"amount": 1,
"external_ref": "<string>",
"wage_type_code": "<string>"
}
],
"valid_from": "2023-12-25",
"valid_to": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
benefits: [
{
amount: '0.00',
cash_alternative_amount: '0.00',
external_ref: '<string>',
foregone_amount: '0.00',
make_good_amount: '0.00',
wage_type_code: '<string>'
}
],
deductions: [
{
amount: 1,
external_ref: '<string>',
sacrificed_amount: 1,
wage_type_code: '<string>'
}
],
earnings: [
{
amount: 123,
earning_frequency: 'MONTH',
earning_type: 'AMOUNT',
external_ref: '<string>',
is_lumpsum: false,
sacrificed_amount: 1,
wage_type_code: '<string>'
}
],
reimbursements: [{amount: 1, external_ref: '<string>', wage_type_code: '<string>'}],
valid_from: '2023-12-25',
valid_to: '2023-12-25'
})
};
fetch('https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation', 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}/compensation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'benefits' => [
[
'amount' => '0.00',
'cash_alternative_amount' => '0.00',
'external_ref' => '<string>',
'foregone_amount' => '0.00',
'make_good_amount' => '0.00',
'wage_type_code' => '<string>'
]
],
'deductions' => [
[
'amount' => 1,
'external_ref' => '<string>',
'sacrificed_amount' => 1,
'wage_type_code' => '<string>'
]
],
'earnings' => [
[
'amount' => 123,
'earning_frequency' => 'MONTH',
'earning_type' => 'AMOUNT',
'external_ref' => '<string>',
'is_lumpsum' => false,
'sacrificed_amount' => 1,
'wage_type_code' => '<string>'
]
],
'reimbursements' => [
[
'amount' => 1,
'external_ref' => '<string>',
'wage_type_code' => '<string>'
]
],
'valid_from' => '2023-12-25',
'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://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation"
payload := strings.NewReader("{\n \"benefits\": [\n {\n \"amount\": \"0.00\",\n \"cash_alternative_amount\": \"0.00\",\n \"external_ref\": \"<string>\",\n \"foregone_amount\": \"0.00\",\n \"make_good_amount\": \"0.00\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"deductions\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"earnings\": [\n {\n \"amount\": 123,\n \"earning_frequency\": \"MONTH\",\n \"earning_type\": \"AMOUNT\",\n \"external_ref\": \"<string>\",\n \"is_lumpsum\": false,\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"reimbursements\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"benefits\": [\n {\n \"amount\": \"0.00\",\n \"cash_alternative_amount\": \"0.00\",\n \"external_ref\": \"<string>\",\n \"foregone_amount\": \"0.00\",\n \"make_good_amount\": \"0.00\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"deductions\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"earnings\": [\n {\n \"amount\": 123,\n \"earning_frequency\": \"MONTH\",\n \"earning_type\": \"AMOUNT\",\n \"external_ref\": \"<string>\",\n \"is_lumpsum\": false,\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"reimbursements\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://preview.intermezzo.ai/gb/organizations/{organization_id}/employees/{employee_id}/compensation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"benefits\": [\n {\n \"amount\": \"0.00\",\n \"cash_alternative_amount\": \"0.00\",\n \"external_ref\": \"<string>\",\n \"foregone_amount\": \"0.00\",\n \"make_good_amount\": \"0.00\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"deductions\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"earnings\": [\n {\n \"amount\": 123,\n \"earning_frequency\": \"MONTH\",\n \"earning_type\": \"AMOUNT\",\n \"external_ref\": \"<string>\",\n \"is_lumpsum\": false,\n \"sacrificed_amount\": 1,\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"reimbursements\": [\n {\n \"amount\": 1,\n \"external_ref\": \"<string>\",\n \"wage_type_code\": \"<string>\"\n }\n ],\n \"valid_from\": \"2023-12-25\",\n \"valid_to\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"edition": 123,
"valid_from": "2023-12-25",
"valid_to": "2023-12-25",
"benefits": [
{
"wage_type_code": "<string>",
"amount": "0.00",
"cash_alternative_amount": "0.00",
"external_ref": "<string>",
"foregone_amount": "0.00",
"make_good_amount": "0.00"
}
],
"deductions": [
{
"amount": "<string>",
"wage_type_code": "<string>",
"external_ref": "<string>",
"sacrificed_amount": "<string>"
}
],
"earnings": [
{
"amount": "<string>",
"wage_type_code": "<string>",
"earning_frequency": "MONTH",
"earning_type": "AMOUNT",
"external_ref": "<string>",
"is_lumpsum": false,
"sacrificed_amount": "<string>"
}
],
"reimbursements": [
{
"amount": "<string>",
"wage_type_code": "<string>",
"external_ref": "<string>"
}
]
}Headers
Body
application/json
Response
Successful Response
Was this page helpful?