PUT /rest/employees/{employee}/illnesses — Create illness record
curl --request PUT \
--url https://{tenant}.stamp.eu/rest/employees/{employee}/illnesses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"is_half_day": true,
"reason": "<string>",
"substitute_employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://{tenant}.stamp.eu/rest/employees/{employee}/illnesses"
payload = {
"type": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"is_half_day": True,
"reason": "<string>",
"substitute_employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
start_date: '2023-11-07T05:31:56Z',
end_date: '2023-11-07T05:31:56Z',
is_half_day: true,
reason: '<string>',
substitute_employee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://{tenant}.stamp.eu/rest/employees/{employee}/illnesses', 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://{tenant}.stamp.eu/rest/employees/{employee}/illnesses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'is_half_day' => true,
'reason' => '<string>',
'substitute_employee_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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://{tenant}.stamp.eu/rest/employees/{employee}/illnesses"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"is_half_day\": true,\n \"reason\": \"<string>\",\n \"substitute_employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{tenant}.stamp.eu/rest/employees/{employee}/illnesses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"is_half_day\": true,\n \"reason\": \"<string>\",\n \"substitute_employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/employees/{employee}/illnesses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"is_half_day\": true,\n \"reason\": \"<string>\",\n \"substitute_employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"employee_id": "<string>",
"type": "<string>",
"is_half_day": true,
"status": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"business_days": 123,
"calculated_days": 123,
"valuation_mode": "<string>",
"reason": "<string>",
"substitute_status": "<string>",
"substitute_responded_at": "<string>",
"decided_by": "<string>",
"decided_at": "<string>",
"decision_note": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"can_withdraw": "<string>",
"withdraw_blocked_reason": "<string>",
"employee_name": "<string>",
"absence_type": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"color": "<string>",
"icon": "<string>",
"is_system": "<string>",
"category": "<string>",
"unit": "<string>",
"half_day_allowed": "<string>",
"affects_vacation": "<string>",
"target_work_factor": 123,
"working_time_flag": "<string>",
"requires_approval": "<string>",
"is_paid": "<string>",
"certificate_required": "<string>",
"certificate_deadline_days": "<string>",
"substitute_option": "<string>",
"count_weekdays_only": "<string>",
"is_active": "<string>",
"sort_order": "<string>"
},
"days": "<string>",
"valued_total": "<string>",
"bucket_allocation": "<string>",
"substitute": {
"id": "<string>",
"name": "<string>"
},
"decided_by_name": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Abwesenheiten
Krankmeldung erstellen
PUT
/
employees
/
{employee}
/
illnesses
PUT /rest/employees/{employee}/illnesses — Create illness record
curl --request PUT \
--url https://{tenant}.stamp.eu/rest/employees/{employee}/illnesses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"is_half_day": true,
"reason": "<string>",
"substitute_employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://{tenant}.stamp.eu/rest/employees/{employee}/illnesses"
payload = {
"type": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"is_half_day": True,
"reason": "<string>",
"substitute_employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
start_date: '2023-11-07T05:31:56Z',
end_date: '2023-11-07T05:31:56Z',
is_half_day: true,
reason: '<string>',
substitute_employee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://{tenant}.stamp.eu/rest/employees/{employee}/illnesses', 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://{tenant}.stamp.eu/rest/employees/{employee}/illnesses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'is_half_day' => true,
'reason' => '<string>',
'substitute_employee_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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://{tenant}.stamp.eu/rest/employees/{employee}/illnesses"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"is_half_day\": true,\n \"reason\": \"<string>\",\n \"substitute_employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{tenant}.stamp.eu/rest/employees/{employee}/illnesses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"is_half_day\": true,\n \"reason\": \"<string>\",\n \"substitute_employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.stamp.eu/rest/employees/{employee}/illnesses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"is_half_day\": true,\n \"reason\": \"<string>\",\n \"substitute_employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"employee_id": "<string>",
"type": "<string>",
"is_half_day": true,
"status": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"business_days": 123,
"calculated_days": 123,
"valuation_mode": "<string>",
"reason": "<string>",
"substitute_status": "<string>",
"substitute_responded_at": "<string>",
"decided_by": "<string>",
"decided_at": "<string>",
"decision_note": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"can_withdraw": "<string>",
"withdraw_blocked_reason": "<string>",
"employee_name": "<string>",
"absence_type": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"color": "<string>",
"icon": "<string>",
"is_system": "<string>",
"category": "<string>",
"unit": "<string>",
"half_day_allowed": "<string>",
"affects_vacation": "<string>",
"target_work_factor": 123,
"working_time_flag": "<string>",
"requires_approval": "<string>",
"is_paid": "<string>",
"certificate_required": "<string>",
"certificate_deadline_days": "<string>",
"substitute_option": "<string>",
"count_weekdays_only": "<string>",
"is_active": "<string>",
"sort_order": "<string>"
},
"days": "<string>",
"valued_total": "<string>",
"bucket_allocation": "<string>",
"substitute": {
"id": "<string>",
"name": "<string>"
},
"decided_by_name": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer-Token, erhalten über den Login-Endpunkt (POST /rest/login).
Path Parameters
The employee ID
Body
application/json
Response
LeaveRequestResource
Show child attributes
Show child attributes
⌘I