curl --request POST \
--url https://api.absentify.com/api/v1/members/{member_id}/adjustments \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"allowance_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 0,
"date": "<string>",
"expiry_date": "<string>",
"comment": ""
}
'import requests
url = "https://api.absentify.com/api/v1/members/{member_id}/adjustments"
payload = {
"allowance_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 0,
"date": "<string>",
"expiry_date": "<string>",
"comment": ""
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allowance_type_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 0,
date: '<string>',
expiry_date: '<string>',
comment: ''
})
};
fetch('https://api.absentify.com/api/v1/members/{member_id}/adjustments', 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}/adjustments",
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([
'allowance_type_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 0,
'date' => '<string>',
'expiry_date' => '<string>',
'comment' => ''
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.absentify.com/api/v1/members/{member_id}/adjustments"
payload := strings.NewReader("{\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 0,\n \"date\": \"<string>\",\n \"expiry_date\": \"<string>\",\n \"comment\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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.absentify.com/api/v1/members/{member_id}/adjustments")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 0,\n \"date\": \"<string>\",\n \"expiry_date\": \"<string>\",\n \"comment\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.absentify.com/api/v1/members/{member_id}/adjustments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 0,\n \"date\": \"<string>\",\n \"expiry_date\": \"<string>\",\n \"comment\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Create an allowance adjustment
Creates a manual adjustment (positive or negative) for a member’s allowance. Use this for one-off corrections, bonuses, or deductions. The adjustment is applied to the fiscal year containing the given date.
curl --request POST \
--url https://api.absentify.com/api/v1/members/{member_id}/adjustments \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"allowance_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 0,
"date": "<string>",
"expiry_date": "<string>",
"comment": ""
}
'import requests
url = "https://api.absentify.com/api/v1/members/{member_id}/adjustments"
payload = {
"allowance_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 0,
"date": "<string>",
"expiry_date": "<string>",
"comment": ""
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allowance_type_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 0,
date: '<string>',
expiry_date: '<string>',
comment: ''
})
};
fetch('https://api.absentify.com/api/v1/members/{member_id}/adjustments', 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}/adjustments",
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([
'allowance_type_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 0,
'date' => '<string>',
'expiry_date' => '<string>',
'comment' => ''
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.absentify.com/api/v1/members/{member_id}/adjustments"
payload := strings.NewReader("{\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 0,\n \"date\": \"<string>\",\n \"expiry_date\": \"<string>\",\n \"comment\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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.absentify.com/api/v1/members/{member_id}/adjustments")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 0,\n \"date\": \"<string>\",\n \"expiry_date\": \"<string>\",\n \"comment\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.absentify.com/api/v1/members/{member_id}/adjustments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 0,\n \"date\": \"<string>\",\n \"expiry_date\": \"<string>\",\n \"comment\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Autorisierungen
Pfadparameter
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Body
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Adjustment amount (positive to add, negative to subtract). For day-based allowance types the value is in days; for hour-based allowance types the value is in MINUTES (e.g. 480 = 8 hours).
-100000 <= x <= 100000Effective date of the adjustment in YYYY-MM-DD format
^\d{4}-\d{2}-\d{2}$Optional. The LAST day (inclusive, YYYY-MM-DD) these days can still be used; from the day after, whatever is left of them is forfeited. To let them be used through 2026-08-31, send 2026-08-31. May equal date (granted and gone the same day). Only allowed for positive adjustments.
^\d{4}-\d{2}-\d{2}$Optional comment for audit trail (max 500 characters)
500Antwort
Successful response
War diese Seite hilfreich?