curl --request POST \
--url https://api.absentify.com/api/v1/members/{member_id}/rule-change \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"current_assignment_id": 0,
"rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowance_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"valid_from": "<string>",
"reason": "<string>",
"valid_until": "<string>"
}
'import requests
url = "https://api.absentify.com/api/v1/members/{member_id}/rule-change"
payload = {
"current_assignment_id": 0,
"rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowance_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"valid_from": "<string>",
"reason": "<string>",
"valid_until": "<string>"
}
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({
current_assignment_id: 0,
rule_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
allowance_type_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
valid_from: '<string>',
reason: '<string>',
valid_until: '<string>'
})
};
fetch('https://api.absentify.com/api/v1/members/{member_id}/rule-change', 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}/rule-change",
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([
'current_assignment_id' => 0,
'rule_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'allowance_type_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'valid_from' => '<string>',
'reason' => '<string>',
'valid_until' => '<string>'
]),
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}/rule-change"
payload := strings.NewReader("{\n \"current_assignment_id\": 0,\n \"rule_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"valid_from\": \"<string>\",\n \"reason\": \"<string>\",\n \"valid_until\": \"<string>\"\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}/rule-change")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"current_assignment_id\": 0,\n \"rule_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"valid_from\": \"<string>\",\n \"reason\": \"<string>\",\n \"valid_until\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.absentify.com/api/v1/members/{member_id}/rule-change")
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 \"current_assignment_id\": 0,\n \"rule_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"valid_from\": \"<string>\",\n \"reason\": \"<string>\",\n \"valid_until\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"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": []
}Move a member to another rule
Ends the member’s current assignment on valid_from and starts the new rule on the same day, in one transaction. Prefer this over deleting and recreating assignments: it leaves neither a gap nor an overlap, and records the move as a single audit entry. A valid_until is only accepted on the day before the next assignment starts or on the member’s last employment day, so send null when nothing follows. Gaps or overlaps that predate this rule are tolerated, but the move may not widen them.
curl --request POST \
--url https://api.absentify.com/api/v1/members/{member_id}/rule-change \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"current_assignment_id": 0,
"rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowance_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"valid_from": "<string>",
"reason": "<string>",
"valid_until": "<string>"
}
'import requests
url = "https://api.absentify.com/api/v1/members/{member_id}/rule-change"
payload = {
"current_assignment_id": 0,
"rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowance_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"valid_from": "<string>",
"reason": "<string>",
"valid_until": "<string>"
}
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({
current_assignment_id: 0,
rule_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
allowance_type_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
valid_from: '<string>',
reason: '<string>',
valid_until: '<string>'
})
};
fetch('https://api.absentify.com/api/v1/members/{member_id}/rule-change', 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}/rule-change",
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([
'current_assignment_id' => 0,
'rule_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'allowance_type_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'valid_from' => '<string>',
'reason' => '<string>',
'valid_until' => '<string>'
]),
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}/rule-change"
payload := strings.NewReader("{\n \"current_assignment_id\": 0,\n \"rule_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"valid_from\": \"<string>\",\n \"reason\": \"<string>\",\n \"valid_until\": \"<string>\"\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}/rule-change")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"current_assignment_id\": 0,\n \"rule_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"valid_from\": \"<string>\",\n \"reason\": \"<string>\",\n \"valid_until\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.absentify.com/api/v1/members/{member_id}/rule-change")
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 \"current_assignment_id\": 0,\n \"rule_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowance_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"valid_from\": \"<string>\",\n \"reason\": \"<string>\",\n \"valid_until\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"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
The assignment being replaced, from GET /members/{member_id}/rule-assignments.
-9007199254740991 <= x <= 9007199254740991The rule to move the member to.
^([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})$^([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})$First day the new rule applies (inclusive), in YYYY-MM-DD format. Must be after the current assignment's start date.
^\d{4}-\d{2}-\d{2}$Why the member is being moved — stored in the rule audit log.
3 - 500Last day the new rule applies (inclusive), in YYYY-MM-DD format, or null for open-ended. To cover the member through 2026-08-31, send 2026-08-31.
^\d{4}-\d{2}-\d{2}$Antwort
Successful response
War diese Seite hilfreich?