Update absence
curl --request PATCH \
--url https://cloud-api.pland.app/v2/absences/{id} \
--header 'Content-Type: application/json' \
--header 'x-API-Key: <api-key>' \
--data '
{
"dtStart": 123,
"dtEnd": 123,
"daysAbsent": 123,
"type": 123,
"desc": "<string>",
"payTypeAbsenceId": "<string>",
"calculationType": "<string>",
"imageIds": [
"<string>"
]
}
'import requests
url = "https://cloud-api.pland.app/v2/absences/{id}"
payload = {
"dtStart": 123,
"dtEnd": 123,
"daysAbsent": 123,
"type": 123,
"desc": "<string>",
"payTypeAbsenceId": "<string>",
"calculationType": "<string>",
"imageIds": ["<string>"]
}
headers = {
"x-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dtStart: 123,
dtEnd: 123,
daysAbsent: 123,
type: 123,
desc: '<string>',
payTypeAbsenceId: '<string>',
calculationType: '<string>',
imageIds: ['<string>']
})
};
fetch('https://cloud-api.pland.app/v2/absences/{id}', 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://cloud-api.pland.app/v2/absences/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'dtStart' => 123,
'dtEnd' => 123,
'daysAbsent' => 123,
'type' => 123,
'desc' => '<string>',
'payTypeAbsenceId' => '<string>',
'calculationType' => '<string>',
'imageIds' => [
'<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://cloud-api.pland.app/v2/absences/{id}"
payload := strings.NewReader("{\n \"dtStart\": 123,\n \"dtEnd\": 123,\n \"daysAbsent\": 123,\n \"type\": 123,\n \"desc\": \"<string>\",\n \"payTypeAbsenceId\": \"<string>\",\n \"calculationType\": \"<string>\",\n \"imageIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://cloud-api.pland.app/v2/absences/{id}")
.header("x-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dtStart\": 123,\n \"dtEnd\": 123,\n \"daysAbsent\": 123,\n \"type\": 123,\n \"desc\": \"<string>\",\n \"payTypeAbsenceId\": \"<string>\",\n \"calculationType\": \"<string>\",\n \"imageIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud-api.pland.app/v2/absences/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dtStart\": 123,\n \"dtEnd\": 123,\n \"daysAbsent\": 123,\n \"type\": 123,\n \"desc\": \"<string>\",\n \"payTypeAbsenceId\": \"<string>\",\n \"calculationType\": \"<string>\",\n \"imageIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"updated": true
}Absences
Update Absence
Update an existing absence record with new data. Only provided fields will be updated.
PATCH
/
absences
/
{id}
Update absence
curl --request PATCH \
--url https://cloud-api.pland.app/v2/absences/{id} \
--header 'Content-Type: application/json' \
--header 'x-API-Key: <api-key>' \
--data '
{
"dtStart": 123,
"dtEnd": 123,
"daysAbsent": 123,
"type": 123,
"desc": "<string>",
"payTypeAbsenceId": "<string>",
"calculationType": "<string>",
"imageIds": [
"<string>"
]
}
'import requests
url = "https://cloud-api.pland.app/v2/absences/{id}"
payload = {
"dtStart": 123,
"dtEnd": 123,
"daysAbsent": 123,
"type": 123,
"desc": "<string>",
"payTypeAbsenceId": "<string>",
"calculationType": "<string>",
"imageIds": ["<string>"]
}
headers = {
"x-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dtStart: 123,
dtEnd: 123,
daysAbsent: 123,
type: 123,
desc: '<string>',
payTypeAbsenceId: '<string>',
calculationType: '<string>',
imageIds: ['<string>']
})
};
fetch('https://cloud-api.pland.app/v2/absences/{id}', 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://cloud-api.pland.app/v2/absences/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'dtStart' => 123,
'dtEnd' => 123,
'daysAbsent' => 123,
'type' => 123,
'desc' => '<string>',
'payTypeAbsenceId' => '<string>',
'calculationType' => '<string>',
'imageIds' => [
'<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://cloud-api.pland.app/v2/absences/{id}"
payload := strings.NewReader("{\n \"dtStart\": 123,\n \"dtEnd\": 123,\n \"daysAbsent\": 123,\n \"type\": 123,\n \"desc\": \"<string>\",\n \"payTypeAbsenceId\": \"<string>\",\n \"calculationType\": \"<string>\",\n \"imageIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://cloud-api.pland.app/v2/absences/{id}")
.header("x-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dtStart\": 123,\n \"dtEnd\": 123,\n \"daysAbsent\": 123,\n \"type\": 123,\n \"desc\": \"<string>\",\n \"payTypeAbsenceId\": \"<string>\",\n \"calculationType\": \"<string>\",\n \"imageIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud-api.pland.app/v2/absences/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dtStart\": 123,\n \"dtEnd\": 123,\n \"daysAbsent\": 123,\n \"type\": 123,\n \"desc\": \"<string>\",\n \"payTypeAbsenceId\": \"<string>\",\n \"calculationType\": \"<string>\",\n \"imageIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"updated": true
}Authorizations
API-KeyBearer-Auth
Path Parameters
Absence ID to update
Body
application/json
Absence update data
Start date/time of the absence (epoch-ms integer or ISO-8601). Omit to keep the current value; null is not allowed.
End date/time of the absence (epoch-ms integer or ISO-8601). Omit to keep the current value; null is not allowed.
Number of days absent
Absence type
Description or comment for the absence
Pay type absence ID
Calculation type
Image IDs associated with the absence
Response
Absence updated successfully
Example:
true
Was this page helpful?

