curl --request PUT \
--url https://a-char.com/api/v1/time-off/requests/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"note": "<string>",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kept_attachment_paths": [
"<string>"
],
"attachments": []
}
'import requests
url = "https://a-char.com/api/v1/time-off/requests/{id}"
payload = {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"note": "<string>",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kept_attachment_paths": ["<string>"],
"attachments": []
}
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({
start_date: '2023-12-25',
end_date: '2023-12-25',
note: '<string>',
employee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
kept_attachment_paths: ['<string>'],
attachments: []
})
};
fetch('https://a-char.com/api/v1/time-off/requests/{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://a-char.com/api/v1/time-off/requests/{id}",
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([
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'note' => '<string>',
'employee_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'kept_attachment_paths' => [
'<string>'
],
'attachments' => [
]
]),
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://a-char.com/api/v1/time-off/requests/{id}"
payload := strings.NewReader("{\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"note\": \"<string>\",\n \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"kept_attachment_paths\": [\n \"<string>\"\n ],\n \"attachments\": []\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://a-char.com/api/v1/time-off/requests/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"note\": \"<string>\",\n \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"kept_attachment_paths\": [\n \"<string>\"\n ],\n \"attachments\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://a-char.com/api/v1/time-off/requests/{id}")
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 \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"note\": \"<string>\",\n \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"kept_attachment_paths\": [\n \"<string>\"\n ],\n \"attachments\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Update a time-off request
Changes a pending or approved request; a changed request goes back to its approvers. Send only what changes — omitted dates and note stay as they are, and the policy cannot be changed. Dates are checked against the notice period and the bookable range only when they change, so a file can still be added to a request that has already started. attachments adds files (images and PDFs, 4 MB in total, sent as multipart/form-data with one attachments[] part per file); kept_attachment_paths lists the existing attachments to keep — omit it to keep them all. Defaults to the caller’s own request; employee_id changes someone else’s and needs the admin role or being their approver. Requires the time-off:write scope.
curl --request PUT \
--url https://a-char.com/api/v1/time-off/requests/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"note": "<string>",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kept_attachment_paths": [
"<string>"
],
"attachments": []
}
'import requests
url = "https://a-char.com/api/v1/time-off/requests/{id}"
payload = {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"note": "<string>",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kept_attachment_paths": ["<string>"],
"attachments": []
}
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({
start_date: '2023-12-25',
end_date: '2023-12-25',
note: '<string>',
employee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
kept_attachment_paths: ['<string>'],
attachments: []
})
};
fetch('https://a-char.com/api/v1/time-off/requests/{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://a-char.com/api/v1/time-off/requests/{id}",
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([
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'note' => '<string>',
'employee_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'kept_attachment_paths' => [
'<string>'
],
'attachments' => [
]
]),
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://a-char.com/api/v1/time-off/requests/{id}"
payload := strings.NewReader("{\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"note\": \"<string>\",\n \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"kept_attachment_paths\": [\n \"<string>\"\n ],\n \"attachments\": []\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://a-char.com/api/v1/time-off/requests/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"note\": \"<string>\",\n \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"kept_attachment_paths\": [\n \"<string>\"\n ],\n \"attachments\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://a-char.com/api/v1/time-off/requests/{id}")
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 \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"note\": \"<string>\",\n \"employee_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"kept_attachment_paths\": [\n \"<string>\"\n ],\n \"attachments\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
FULL_DAY, AM, PM FULL_DAY, AM, PM 3001010Response
OK