curl --request GET \
--url https://api.absentify.com/api/v1/members/{member_id}/allowances \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.absentify.com/api/v1/members/{member_id}/allowances"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.absentify.com/api/v1/members/{member_id}/allowances', 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.absentify.com/api/v1/members/{member_id}/allowances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <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"
"net/http"
"io"
)
func main() {
url := "https://api.absentify.com/api/v1/members/{member_id}/allowances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.absentify.com/api/v1/members/{member_id}/allowances")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.absentify.com/api/v1/members/{member_id}/allowances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"member_id": "<string>",
"allowance_type_id": "<string>",
"year": 0,
"start": "<string>",
"end": "<string>",
"allowance": 123,
"rule_allowance": 123,
"adjustments": 123,
"brought_forward": 123,
"overwrite_brought_forward": true,
"compensatory_time_off": 123,
"taken": 123,
"remaining": 123,
"carry_over": 123,
"will_expire": 123,
"expired": 123,
"carry_forward_deadline": "<string>",
"expiring_adjustments": {
"amount": 123,
"earliest_expiry": "<string>"
},
"allowance_type": {
"id": "<string>",
"name": "<string>",
"default_name": "<string>",
"allowance_unit": "days"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
]{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}List a member's allowances
Every fiscal year of every allowance type the member can use, oldest first. Allowance types that are switched off for this member are left out. This is the read side of the deprecated PUT /members//allowance//.
Allowance figures are computed at the time of the call. An allowance type without a rule assignment, and a workspace that still uses flat allowances, report the stored figures, and only years with a stored row are listed. An allowance’s updatedAt is when its stored row was last written, not when the figures were computed.
curl --request GET \
--url https://api.absentify.com/api/v1/members/{member_id}/allowances \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.absentify.com/api/v1/members/{member_id}/allowances"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.absentify.com/api/v1/members/{member_id}/allowances', 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.absentify.com/api/v1/members/{member_id}/allowances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <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"
"net/http"
"io"
)
func main() {
url := "https://api.absentify.com/api/v1/members/{member_id}/allowances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.absentify.com/api/v1/members/{member_id}/allowances")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.absentify.com/api/v1/members/{member_id}/allowances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"member_id": "<string>",
"allowance_type_id": "<string>",
"year": 0,
"start": "<string>",
"end": "<string>",
"allowance": 123,
"rule_allowance": 123,
"adjustments": 123,
"brought_forward": 123,
"overwrite_brought_forward": true,
"compensatory_time_off": 123,
"taken": 123,
"remaining": 123,
"carry_over": 123,
"will_expire": 123,
"expired": 123,
"carry_forward_deadline": "<string>",
"expiring_adjustments": {
"amount": 123,
"earliest_expiry": "<string>"
},
"allowance_type": {
"id": "<string>",
"name": "<string>",
"default_name": "<string>",
"allowance_unit": "days"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
]{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Path Parameters
Query Parameters
Response
Successful response
Compensatory time off of this year, including approved overtime credits. Days for day-based allowance types, MINUTES for hour-based ones. On an allowance type with overtime logging, or with credited overtime in that year, it cannot be changed through PUT /members/{id}/allowance/{allowance_type_id}/{year}: log overtime with POST /overtime-entries instead.
Was this page helpful?