curl --request POST \
--url https://api.rippling.com/platform/api/leave_requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "5ae0b2cb40cae73202bd66cc",
"status": "PENDING",
"startDate": "2018-08-22",
"endDate": "2018-08-24",
"startDateStartTime": "2018-08-22T12:00:00.235000-07:00",
"endDateEndTime": "2018-08-24T15:00:00.235000-07:00",
"startDateCustomHours": "8",
"endDateCustomHours": "4",
"reasonForLeave": "Visiting hometown for my brother’s wedding",
"companyLeaveType": "4c397f3b3c304e478da575da",
"leavePolicy": "5b998cf940cae798a83e87fd"
}
'import requests
url = "https://api.rippling.com/platform/api/leave_requests"
payload = {
"role": "5ae0b2cb40cae73202bd66cc",
"status": "PENDING",
"startDate": "2018-08-22",
"endDate": "2018-08-24",
"startDateStartTime": "2018-08-22T12:00:00.235000-07:00",
"endDateEndTime": "2018-08-24T15:00:00.235000-07:00",
"startDateCustomHours": "8",
"endDateCustomHours": "4",
"reasonForLeave": "Visiting hometown for my brother’s wedding",
"companyLeaveType": "4c397f3b3c304e478da575da",
"leavePolicy": "5b998cf940cae798a83e87fd"
}
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({
role: '5ae0b2cb40cae73202bd66cc',
status: 'PENDING',
startDate: '2018-08-22',
endDate: '2018-08-24',
startDateStartTime: '2018-08-22T12:00:00.235000-07:00',
endDateEndTime: '2018-08-24T15:00:00.235000-07:00',
startDateCustomHours: '8',
endDateCustomHours: '4',
reasonForLeave: 'Visiting hometown for my brother’s wedding',
companyLeaveType: '4c397f3b3c304e478da575da',
leavePolicy: '5b998cf940cae798a83e87fd'
})
};
fetch('https://api.rippling.com/platform/api/leave_requests', 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.rippling.com/platform/api/leave_requests",
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([
'role' => '5ae0b2cb40cae73202bd66cc',
'status' => 'PENDING',
'startDate' => '2018-08-22',
'endDate' => '2018-08-24',
'startDateStartTime' => '2018-08-22T12:00:00.235000-07:00',
'endDateEndTime' => '2018-08-24T15:00:00.235000-07:00',
'startDateCustomHours' => '8',
'endDateCustomHours' => '4',
'reasonForLeave' => 'Visiting hometown for my brother’s wedding',
'companyLeaveType' => '4c397f3b3c304e478da575da',
'leavePolicy' => '5b998cf940cae798a83e87fd'
]),
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://api.rippling.com/platform/api/leave_requests"
payload := strings.NewReader("{\n \"role\": \"5ae0b2cb40cae73202bd66cc\",\n \"status\": \"PENDING\",\n \"startDate\": \"2018-08-22\",\n \"endDate\": \"2018-08-24\",\n \"startDateStartTime\": \"2018-08-22T12:00:00.235000-07:00\",\n \"endDateEndTime\": \"2018-08-24T15:00:00.235000-07:00\",\n \"startDateCustomHours\": \"8\",\n \"endDateCustomHours\": \"4\",\n \"reasonForLeave\": \"Visiting hometown for my brother’s wedding\",\n \"companyLeaveType\": \"4c397f3b3c304e478da575da\",\n \"leavePolicy\": \"5b998cf940cae798a83e87fd\"\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://api.rippling.com/platform/api/leave_requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role\": \"5ae0b2cb40cae73202bd66cc\",\n \"status\": \"PENDING\",\n \"startDate\": \"2018-08-22\",\n \"endDate\": \"2018-08-24\",\n \"startDateStartTime\": \"2018-08-22T12:00:00.235000-07:00\",\n \"endDateEndTime\": \"2018-08-24T15:00:00.235000-07:00\",\n \"startDateCustomHours\": \"8\",\n \"endDateCustomHours\": \"4\",\n \"reasonForLeave\": \"Visiting hometown for my brother’s wedding\",\n \"companyLeaveType\": \"4c397f3b3c304e478da575da\",\n \"leavePolicy\": \"5b998cf940cae798a83e87fd\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rippling.com/platform/api/leave_requests")
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 \"role\": \"5ae0b2cb40cae73202bd66cc\",\n \"status\": \"PENDING\",\n \"startDate\": \"2018-08-22\",\n \"endDate\": \"2018-08-24\",\n \"startDateStartTime\": \"2018-08-22T12:00:00.235000-07:00\",\n \"endDateEndTime\": \"2018-08-24T15:00:00.235000-07:00\",\n \"startDateCustomHours\": \"8\",\n \"endDateCustomHours\": \"4\",\n \"reasonForLeave\": \"Visiting hometown for my brother’s wedding\",\n \"companyLeaveType\": \"4c397f3b3c304e478da575da\",\n \"leavePolicy\": \"5b998cf940cae798a83e87fd\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "5b998dfb40cae798a83e8874",
"createdAt": "2018-08-12T15:06:51.681000-07:00",
"updatedAt": "2018-08-13T15:06:51.684000-07:00",
"role": "5ae0b2cb40cae73202bd66cc",
"roleName": "Jane Doe",
"requestedBy": "5ae0b2cb40cae73202bd66cc",
"requestedByName": "Jane Doe",
"status": "PENDING",
"startDate": "2018-08-22",
"endDate": "2018-08-24",
"startDateStartTime": "2018-08-22T12:00:00.235000-07:00",
"endDateEndTime": "2018-08-24T15:00:00.235000-07:00",
"startDateCustomHours": 8,
"endDateCustomHours": 4,
"comments": null,
"numHours": 20,
"numMinutes": 1200,
"leavePolicy": "5b998cf940cae798a83e87fd",
"leaveType": "VACATION",
"policyDisplayName": "Vacation",
"processedAt": null,
"processedBy": null,
"processedByName": null,
"reasonForLeave": "Visiting hometown for my brother’s wedding",
"externalId": "qwerty12345",
"roleTimezone": "America/Los_Angeles",
"dates": [
{
"date": "2018-08-22",
"numMinutes": 480
},
{
"date": "2018-08-23",
"numMinutes": 480
},
{
"date": "2018-08-24",
"numMinutes": 240
}
]
}
]POST Leave Request
Create a leave request. This endpoint is currently in alpha and should not be used by default. Only TILT managed requests can have a status other than PENDING.
curl --request POST \
--url https://api.rippling.com/platform/api/leave_requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "5ae0b2cb40cae73202bd66cc",
"status": "PENDING",
"startDate": "2018-08-22",
"endDate": "2018-08-24",
"startDateStartTime": "2018-08-22T12:00:00.235000-07:00",
"endDateEndTime": "2018-08-24T15:00:00.235000-07:00",
"startDateCustomHours": "8",
"endDateCustomHours": "4",
"reasonForLeave": "Visiting hometown for my brother’s wedding",
"companyLeaveType": "4c397f3b3c304e478da575da",
"leavePolicy": "5b998cf940cae798a83e87fd"
}
'import requests
url = "https://api.rippling.com/platform/api/leave_requests"
payload = {
"role": "5ae0b2cb40cae73202bd66cc",
"status": "PENDING",
"startDate": "2018-08-22",
"endDate": "2018-08-24",
"startDateStartTime": "2018-08-22T12:00:00.235000-07:00",
"endDateEndTime": "2018-08-24T15:00:00.235000-07:00",
"startDateCustomHours": "8",
"endDateCustomHours": "4",
"reasonForLeave": "Visiting hometown for my brother’s wedding",
"companyLeaveType": "4c397f3b3c304e478da575da",
"leavePolicy": "5b998cf940cae798a83e87fd"
}
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({
role: '5ae0b2cb40cae73202bd66cc',
status: 'PENDING',
startDate: '2018-08-22',
endDate: '2018-08-24',
startDateStartTime: '2018-08-22T12:00:00.235000-07:00',
endDateEndTime: '2018-08-24T15:00:00.235000-07:00',
startDateCustomHours: '8',
endDateCustomHours: '4',
reasonForLeave: 'Visiting hometown for my brother’s wedding',
companyLeaveType: '4c397f3b3c304e478da575da',
leavePolicy: '5b998cf940cae798a83e87fd'
})
};
fetch('https://api.rippling.com/platform/api/leave_requests', 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.rippling.com/platform/api/leave_requests",
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([
'role' => '5ae0b2cb40cae73202bd66cc',
'status' => 'PENDING',
'startDate' => '2018-08-22',
'endDate' => '2018-08-24',
'startDateStartTime' => '2018-08-22T12:00:00.235000-07:00',
'endDateEndTime' => '2018-08-24T15:00:00.235000-07:00',
'startDateCustomHours' => '8',
'endDateCustomHours' => '4',
'reasonForLeave' => 'Visiting hometown for my brother’s wedding',
'companyLeaveType' => '4c397f3b3c304e478da575da',
'leavePolicy' => '5b998cf940cae798a83e87fd'
]),
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://api.rippling.com/platform/api/leave_requests"
payload := strings.NewReader("{\n \"role\": \"5ae0b2cb40cae73202bd66cc\",\n \"status\": \"PENDING\",\n \"startDate\": \"2018-08-22\",\n \"endDate\": \"2018-08-24\",\n \"startDateStartTime\": \"2018-08-22T12:00:00.235000-07:00\",\n \"endDateEndTime\": \"2018-08-24T15:00:00.235000-07:00\",\n \"startDateCustomHours\": \"8\",\n \"endDateCustomHours\": \"4\",\n \"reasonForLeave\": \"Visiting hometown for my brother’s wedding\",\n \"companyLeaveType\": \"4c397f3b3c304e478da575da\",\n \"leavePolicy\": \"5b998cf940cae798a83e87fd\"\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://api.rippling.com/platform/api/leave_requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role\": \"5ae0b2cb40cae73202bd66cc\",\n \"status\": \"PENDING\",\n \"startDate\": \"2018-08-22\",\n \"endDate\": \"2018-08-24\",\n \"startDateStartTime\": \"2018-08-22T12:00:00.235000-07:00\",\n \"endDateEndTime\": \"2018-08-24T15:00:00.235000-07:00\",\n \"startDateCustomHours\": \"8\",\n \"endDateCustomHours\": \"4\",\n \"reasonForLeave\": \"Visiting hometown for my brother’s wedding\",\n \"companyLeaveType\": \"4c397f3b3c304e478da575da\",\n \"leavePolicy\": \"5b998cf940cae798a83e87fd\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rippling.com/platform/api/leave_requests")
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 \"role\": \"5ae0b2cb40cae73202bd66cc\",\n \"status\": \"PENDING\",\n \"startDate\": \"2018-08-22\",\n \"endDate\": \"2018-08-24\",\n \"startDateStartTime\": \"2018-08-22T12:00:00.235000-07:00\",\n \"endDateEndTime\": \"2018-08-24T15:00:00.235000-07:00\",\n \"startDateCustomHours\": \"8\",\n \"endDateCustomHours\": \"4\",\n \"reasonForLeave\": \"Visiting hometown for my brother’s wedding\",\n \"companyLeaveType\": \"4c397f3b3c304e478da575da\",\n \"leavePolicy\": \"5b998cf940cae798a83e87fd\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "5b998dfb40cae798a83e8874",
"createdAt": "2018-08-12T15:06:51.681000-07:00",
"updatedAt": "2018-08-13T15:06:51.684000-07:00",
"role": "5ae0b2cb40cae73202bd66cc",
"roleName": "Jane Doe",
"requestedBy": "5ae0b2cb40cae73202bd66cc",
"requestedByName": "Jane Doe",
"status": "PENDING",
"startDate": "2018-08-22",
"endDate": "2018-08-24",
"startDateStartTime": "2018-08-22T12:00:00.235000-07:00",
"endDateEndTime": "2018-08-24T15:00:00.235000-07:00",
"startDateCustomHours": 8,
"endDateCustomHours": 4,
"comments": null,
"numHours": 20,
"numMinutes": 1200,
"leavePolicy": "5b998cf940cae798a83e87fd",
"leaveType": "VACATION",
"policyDisplayName": "Vacation",
"processedAt": null,
"processedBy": null,
"processedByName": null,
"reasonForLeave": "Visiting hometown for my brother’s wedding",
"externalId": "qwerty12345",
"roleTimezone": "America/Los_Angeles",
"dates": [
{
"date": "2018-08-22",
"numMinutes": 480
},
{
"date": "2018-08-23",
"numMinutes": 480
},
{
"date": "2018-08-24",
"numMinutes": 240
}
]
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Unique identifier of the employee who is taking leave.
Unique identifier of the company leave type
Unique identifier of the leave policy. Required if request is not managed by TILT
The status to create the leave request in. Only TILT managed requests can take a status other than PENDING.
String identifier for third party that manages this leave request. This may be null.
Object id for corresponding leave obejct in third party system. This may be null.
Response
OK
Leave request object.
Unique identifier of the leave request.
Unique identifier of the employee who is taking leave.
Unique identifier of the employee who made the request (in most cases this is the same as role).
PENDING, APPROVED, REJECTED, CANCELED VACATION, SICK, JURY_DUTY Unique identifier of the employee who approved or rejected the request. This may be null.
Timezone of the role. This will be work location timezone, or home timezone for employees without a work location.
Show child attributes
Show child attributes
If the leave request is paid this will be TRUE. Otherwise, this will be FALSE.
This indicates the system that manages the Leave Request. PTO = managed by Rippling's Time Off app. LEAVES = managed by Rippling's Leave Management app. TILT = managed by third-party partner Tilt.
PTO, LEAVES, TILT Show child attributes
Show child attributes