Approve a regularization (advances the Manager → HR chain)
curl --request POST \
--url https://app.ontime.hosai.app/api/regularizations/{id}/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "<string>"
}
'import requests
url = "https://app.ontime.hosai.app/api/regularizations/{id}/approve"
payload = { "note": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({note: '<string>'})
};
fetch('https://app.ontime.hosai.app/api/regularizations/{id}/approve', 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://app.ontime.hosai.app/api/regularizations/{id}/approve",
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([
'note' => '<string>'
]),
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://app.ontime.hosai.app/api/regularizations/{id}/approve"
payload := strings.NewReader("{\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.ontime.hosai.app/api/regularizations/{id}/approve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.ontime.hosai.app/api/regularizations/{id}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employeeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employeeName": "<string>",
"employeeCode": "<string>",
"department": "<string>",
"managerName": "<string>",
"date": "<string>",
"type": "MissingPunchIn",
"reason": "<string>",
"requestedChange": "<string>",
"status": "AwaitingManager",
"requiresHrApproval": true,
"managerDecisionBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"managerDecisionName": "<string>",
"managerDecidedAt": "<string>",
"hrDecisionBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hrDecisionName": "<string>",
"hrDecidedAt": "<string>",
"decisionNote": "<string>",
"createdAt": "<string>",
"ageHours": 123,
"urgent": true,
"timeline": [
{
"key": "submitted",
"label": "<string>",
"state": "done",
"actorName": "<string>",
"at": "<string>",
"note": "<string>"
}
],
"trail": [
{
"time": "<string>",
"kind": "bio",
"what": "<string>",
"detail": "<string>",
"tone": "neutral"
}
],
"decision": {
"loggedMinutes": 0,
"claimedMinutes": 0,
"netImpactLabel": "<string>",
"otTrigger": "<string>",
"payrollCycle": "<string>"
},
"priorRegs90d": 0,
"patternCheck": [
{
"label": "<string>",
"value": "<string>",
"ok": true
}
],
"policy": [
{
"label": "<string>",
"value": "<string>",
"ok": true
}
],
"evidence": [
{
"label": "<string>",
"sub": "<string>",
"kind": "selfie",
"tone": "neutral",
"href": "<string>",
"meta": "<string>"
}
],
"discussion": [
{
"id": "<string>",
"senderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"who": "<string>",
"role": "employee",
"when": "<string>",
"text": "<string>",
"mine": true
}
]
}Regularization
Approve a regularization (advances the Manager → HR chain)
Approve a regularization (advances the Manager → HR chain)
POST
/
api
/
regularizations
/
{id}
/
approve
Approve a regularization (advances the Manager → HR chain)
curl --request POST \
--url https://app.ontime.hosai.app/api/regularizations/{id}/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "<string>"
}
'import requests
url = "https://app.ontime.hosai.app/api/regularizations/{id}/approve"
payload = { "note": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({note: '<string>'})
};
fetch('https://app.ontime.hosai.app/api/regularizations/{id}/approve', 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://app.ontime.hosai.app/api/regularizations/{id}/approve",
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([
'note' => '<string>'
]),
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://app.ontime.hosai.app/api/regularizations/{id}/approve"
payload := strings.NewReader("{\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.ontime.hosai.app/api/regularizations/{id}/approve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.ontime.hosai.app/api/regularizations/{id}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employeeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employeeName": "<string>",
"employeeCode": "<string>",
"department": "<string>",
"managerName": "<string>",
"date": "<string>",
"type": "MissingPunchIn",
"reason": "<string>",
"requestedChange": "<string>",
"status": "AwaitingManager",
"requiresHrApproval": true,
"managerDecisionBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"managerDecisionName": "<string>",
"managerDecidedAt": "<string>",
"hrDecisionBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hrDecisionName": "<string>",
"hrDecidedAt": "<string>",
"decisionNote": "<string>",
"createdAt": "<string>",
"ageHours": 123,
"urgent": true,
"timeline": [
{
"key": "submitted",
"label": "<string>",
"state": "done",
"actorName": "<string>",
"at": "<string>",
"note": "<string>"
}
],
"trail": [
{
"time": "<string>",
"kind": "bio",
"what": "<string>",
"detail": "<string>",
"tone": "neutral"
}
],
"decision": {
"loggedMinutes": 0,
"claimedMinutes": 0,
"netImpactLabel": "<string>",
"otTrigger": "<string>",
"payrollCycle": "<string>"
},
"priorRegs90d": 0,
"patternCheck": [
{
"label": "<string>",
"value": "<string>",
"ok": true
}
],
"policy": [
{
"label": "<string>",
"value": "<string>",
"ok": true
}
],
"evidence": [
{
"label": "<string>",
"sub": "<string>",
"kind": "selfie",
"tone": "neutral",
"href": "<string>",
"meta": "<string>"
}
],
"discussion": [
{
"id": "<string>",
"senderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"who": "<string>",
"role": "employee",
"when": "<string>",
"text": "<string>",
"mine": true
}
]
}Authorizations
Issue keys in Settings → API. Send them as Authorization: Bearer ont_… (an X-Api-Key: ont_… header is also accepted). Session-cookie routes are used by the OnTime web apps and are shown for completeness.
Path Parameters
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Body
application/json
Maximum string length:
500Response
200 - application/json
Success
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Available options:
MissingPunchIn, MissingPunchOut, OffZone, ManualEntry, WrongLocation Available options:
AwaitingManager, ManagerApprovedAwaitingHR, Approved, Rejected Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required range:
-9007199254740991 <= x <= 9007199254740991Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes