Vacation Entitlements
Response absence(s) between two dates
URL
https://app.papershift.com/public_api/v1/vacation_entitlements
Method
GET
Parameters
Parameters | Type | Required |
---|---|---|
api_token | String | required |
start_date | String (use ISO) | optional |
end_date | String (use ISO) | optional |
user_id | Integer | required |
user_external_id | String | required if user_id not set |
page | Integer | optional |
A successful request returns an array of the n-th 25 vacation entitlements depending
on the page param. You can also pass a user’s external- or record ID
to only query for vacation entitlements of this specific user. Additionally, optional parameters
such as start_date or end_date allow you to retrieve vacation entitlements within specific date range.
Example
{
"api_token":"U6H2QWD6UWsI8sgs6TyvoK1E6HdliuTL2LgniO18",
"range_start":"2022-10-01",
"range_end":"2022-10-31",
"user_external_id":"User-001",
"user_id":5,
"page":1
}
function getAbsences() {
var api_token = "rJkAk7Bzm5uDipfJY9aZtWhHxfsz06oO5ggJyvI7";
var range_start = "2022-10-01";
var range_end = "2022-10-31";
$.ajax({
url: "https://app.papershift.com/public_api/v1/vacation_entitlements?api_token=" + api_token + "&start_date=" + start_date + "&end_date=" + end_date,
type: 'GET',
dataType: 'json',
complete: function (data) {
console.log(data.responseText);
}
});
}
{
"vacation_times": [
{
"id":2,
"user_id":30,
"starts_at":"2024-05-20",
"ends_at":"2024-06-05",
"planned_days":0.0,
"spent_days":0.0,
"expires":true,
"created_at":"2025-03-19T17:54:47Z",
"updated_at":"2025-03-19T17:54:47Z",
"title":"1",
"transfer_remaining":false,
"end_of_transfer_period":null,
"transferred_days":0.0,
"transferred_to":null,
"import_id":null,
"status":"active",
"locked":false
}
],
"page_number": 1,
"total_pages": 1,
"next_page": null
}
Updated 4 days ago