deleteTimeOffRequest
curl --request DELETE \
--url https://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "deleteTimeOffRequest",
"timeOffRequestId": "A7F26D7A-FAF9-49C6-A623-C14ED3055262"
}
'import requests
url = "https://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest"
payload = {
"method": "deleteTimeOffRequest",
"timeOffRequestId": "A7F26D7A-FAF9-49C6-A623-C14ED3055262"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'deleteTimeOffRequest',
timeOffRequestId: 'A7F26D7A-FAF9-49C6-A623-C14ED3055262'
})
};
fetch('https://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest', 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://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'deleteTimeOffRequest',
'timeOffRequestId' => 'A7F26D7A-FAF9-49C6-A623-C14ED3055262'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest"
payload := strings.NewReader("{\n \"method\": \"deleteTimeOffRequest\",\n \"timeOffRequestId\": \"A7F26D7A-FAF9-49C6-A623-C14ED3055262\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.delete("https://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"deleteTimeOffRequest\",\n \"timeOffRequestId\": \"A7F26D7A-FAF9-49C6-A623-C14ED3055262\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"deleteTimeOffRequest\",\n \"timeOffRequestId\": \"A7F26D7A-FAF9-49C6-A623-C14ED3055262\"\n}"
response = http.request(request)
puts response.read_body{
"timeOffRequest": {
"timeOffRequestId": "31D72E61-60CB-4F2B-A913-ED7EADBEBD98",
"message": "Time off request deleted successfully"
}
}User Portal
deleteTimeOffRequest
The deleteTimeOffRequest API is used to delete PTO requests before they are approved
When to use:
- When the employee has changed their mind about a timeOffRequest
- When a timeOffRequest has been created in error
Note:
- Approved timeOffRequests must be cancelled using
cancelTimeOffrequest
DELETE
/
userPortal
/
deleteTimeOffRequest
deleteTimeOffRequest
curl --request DELETE \
--url https://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "deleteTimeOffRequest",
"timeOffRequestId": "A7F26D7A-FAF9-49C6-A623-C14ED3055262"
}
'import requests
url = "https://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest"
payload = {
"method": "deleteTimeOffRequest",
"timeOffRequestId": "A7F26D7A-FAF9-49C6-A623-C14ED3055262"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'deleteTimeOffRequest',
timeOffRequestId: 'A7F26D7A-FAF9-49C6-A623-C14ED3055262'
})
};
fetch('https://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest', 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://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'deleteTimeOffRequest',
'timeOffRequestId' => 'A7F26D7A-FAF9-49C6-A623-C14ED3055262'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest"
payload := strings.NewReader("{\n \"method\": \"deleteTimeOffRequest\",\n \"timeOffRequestId\": \"A7F26D7A-FAF9-49C6-A623-C14ED3055262\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.delete("https://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"deleteTimeOffRequest\",\n \"timeOffRequestId\": \"A7F26D7A-FAF9-49C6-A623-C14ED3055262\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/userPortal/deleteTimeOffRequest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"deleteTimeOffRequest\",\n \"timeOffRequestId\": \"A7F26D7A-FAF9-49C6-A623-C14ED3055262\"\n}"
response = http.request(request)
puts response.read_body{
"timeOffRequest": {
"timeOffRequestId": "31D72E61-60CB-4F2B-A913-ED7EADBEBD98",
"message": "Time off request deleted successfully"
}
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Response
Show child attributes
Show child attributes
⌘I
