Create Time Off
curl --request POST \
--url https://api.bindbee.dev/api/hris/v1/time-off \
--header 'Authorization: Bearer <token>' \
--header 'x-connector-token: <x-connector-token>'import requests
url = "https://api.bindbee.dev/api/hris/v1/time-off"
headers = {
"x-connector-token": "<x-connector-token>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-connector-token': '<x-connector-token>', Authorization: 'Bearer <token>'}
};
fetch('https://api.bindbee.dev/api/hris/v1/time-off', 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.bindbee.dev/api/hris/v1/time-off",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-connector-token: <x-connector-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bindbee.dev/api/hris/v1/time-off"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-connector-token", "<x-connector-token>")
req.Header.Add("Authorization", "Bearer <token>")
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.bindbee.dev/api/hris/v1/time-off")
.header("x-connector-token", "<x-connector-token>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bindbee.dev/api/hris/v1/time-off")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-connector-token"] = '<x-connector-token>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Time Off
Create Time Off
Creates a TimeOff object with the given values.
POST
/
api
/
hris
/
v1
/
time-off
Create Time Off
curl --request POST \
--url https://api.bindbee.dev/api/hris/v1/time-off \
--header 'Authorization: Bearer <token>' \
--header 'x-connector-token: <x-connector-token>'import requests
url = "https://api.bindbee.dev/api/hris/v1/time-off"
headers = {
"x-connector-token": "<x-connector-token>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-connector-token': '<x-connector-token>', Authorization: 'Bearer <token>'}
};
fetch('https://api.bindbee.dev/api/hris/v1/time-off', 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.bindbee.dev/api/hris/v1/time-off",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-connector-token: <x-connector-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bindbee.dev/api/hris/v1/time-off"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-connector-token", "<x-connector-token>")
req.Header.Add("Authorization", "Bearer <token>")
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.bindbee.dev/api/hris/v1/time-off")
.header("x-connector-token", "<x-connector-token>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bindbee.dev/api/hris/v1/time-off")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-connector-token"] = '<x-connector-token>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}This endpoint creates a Timeoff Entry in the connected HRIS via Bindbee’s unified Time Off model.
Provider-specific behavior
Different HRIS systems can have slightly different requirements and behaviors when creating timeoff entries. Use the accordions below to see details for each provider.ADP
ADP
When the underlying HRIS is ADP, a Timesheet Entry can be created using a payload like:
{
"employee": "01929f6e-c6c1-74b4-8119-a7d9efc0c8b8",
"amount": 8,
"start_time": "2024-09-04T08:00:00Z",
"end_time": "2024-09-04T16:00:00Z",
"request_type": "VACATION"
}
Was this page helpful?
⌘I