Holiday Employee Configuration
Create employee holiday configuration
Creates a holiday configuration for an employee
POST
/
employees
/
{employeeId}
Create employee holiday configuration
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"accrualResetMonth": 123,
"accrualResetDay": 123,
"percentageOfTime": {
"accrualRatePercentage": 123
},
"rolledUp": {
"payRatePercentage": 123
}
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}"
payload = {
"accrualResetMonth": 123,
"accrualResetDay": 123,
"percentageOfTime": { "accrualRatePercentage": 123 },
"rolledUp": { "payRatePercentage": 123 }
}
headers = {
"X-Auth-Token": "<api-key>",
"X-Org-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Auth-Token': '<api-key>',
'X-Org-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accrualResetMonth: 123,
accrualResetDay: 123,
percentageOfTime: {accrualRatePercentage: 123},
rolledUp: {payRatePercentage: 123}
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}', 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://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}",
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([
'accrualResetMonth' => 123,
'accrualResetDay' => 123,
'percentageOfTime' => [
'accrualRatePercentage' => 123
],
'rolledUp' => [
'payRatePercentage' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>",
"X-Org-Id: <api-key>"
],
]);
$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://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}"
payload := strings.NewReader("{\n \"accrualResetMonth\": 123,\n \"accrualResetDay\": 123,\n \"percentageOfTime\": {\n \"accrualRatePercentage\": 123\n },\n \"rolledUp\": {\n \"payRatePercentage\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("X-Org-Id", "<api-key>")
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://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"accrualResetMonth\": 123,\n \"accrualResetDay\": 123,\n \"percentageOfTime\": {\n \"accrualRatePercentage\": 123\n },\n \"rolledUp\": {\n \"payRatePercentage\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<api-key>'
request["X-Org-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accrualResetMonth\": 123,\n \"accrualResetDay\": 123,\n \"percentageOfTime\": {\n \"accrualRatePercentage\": 123\n },\n \"rolledUp\": {\n \"payRatePercentage\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": {
"employeeId": "<string>",
"accrualResetMonth": 123,
"accrualResetDay": 123,
"percentageOfTime": {
"accrualRatePercentage": 123
},
"rolledUp": {
"payRatePercentage": 123
},
"createdBy": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}Authorizations
Authentication token for API access
Organisation to scope the request to. Required when the principal can access more than one organisation; optional for single-organisation principals (the authorizer resolves it automatically).
Path Parameters
Body
application/json
Was this page helpful?
⌘I
Create employee holiday configuration
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"accrualResetMonth": 123,
"accrualResetDay": 123,
"percentageOfTime": {
"accrualRatePercentage": 123
},
"rolledUp": {
"payRatePercentage": 123
}
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}"
payload = {
"accrualResetMonth": 123,
"accrualResetDay": 123,
"percentageOfTime": { "accrualRatePercentage": 123 },
"rolledUp": { "payRatePercentage": 123 }
}
headers = {
"X-Auth-Token": "<api-key>",
"X-Org-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Auth-Token': '<api-key>',
'X-Org-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accrualResetMonth: 123,
accrualResetDay: 123,
percentageOfTime: {accrualRatePercentage: 123},
rolledUp: {payRatePercentage: 123}
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}', 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://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}",
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([
'accrualResetMonth' => 123,
'accrualResetDay' => 123,
'percentageOfTime' => [
'accrualRatePercentage' => 123
],
'rolledUp' => [
'payRatePercentage' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>",
"X-Org-Id: <api-key>"
],
]);
$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://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}"
payload := strings.NewReader("{\n \"accrualResetMonth\": 123,\n \"accrualResetDay\": 123,\n \"percentageOfTime\": {\n \"accrualRatePercentage\": 123\n },\n \"rolledUp\": {\n \"payRatePercentage\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("X-Org-Id", "<api-key>")
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://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"accrualResetMonth\": 123,\n \"accrualResetDay\": 123,\n \"percentageOfTime\": {\n \"accrualRatePercentage\": 123\n },\n \"rolledUp\": {\n \"payRatePercentage\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/holiday/employees/{employeeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<api-key>'
request["X-Org-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accrualResetMonth\": 123,\n \"accrualResetDay\": 123,\n \"percentageOfTime\": {\n \"accrualRatePercentage\": 123\n },\n \"rolledUp\": {\n \"payRatePercentage\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": {
"employeeId": "<string>",
"accrualResetMonth": 123,
"accrualResetDay": 123,
"percentageOfTime": {
"accrualRatePercentage": 123
},
"rolledUp": {
"payRatePercentage": 123
},
"createdBy": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}