API reference
Time off
13 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.
GET/v1/time-offRequests I can see (mine, or my team's)
Requests I can see (mine, or my team's)
Query parameters
| Name | Type | Description |
|---|---|---|
status | "pending" | "approved" | "rejected" | "cancelled" | |
from | string | |
to | string | |
user_id | string | |
mine | boolean | |
location_id | string | |
limit | integer | |
cursor | string |
Example
curl "https://ca-api.clocklap.com/v1/time-off" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/time-offAsk for time off (or add it for someone you manage, approved straight away)
Ask for time off (or add it for someone you manage, approved straight away)
Body (JSON)
| Name | Type | Description |
|---|---|---|
typerequired | "vacation" | "sick" | "personal" | "unpaid" | "other" | |
start_daterequired | string | |
end_daterequired | string | |
minutes_per_day | integer | |
note | string | |
user_id | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/time-off" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"vacation","start_date":"2026-10-26","end_date":"2026-10-26"}'Responses
200
POST/v1/time-off/{id}/approveApprove
Approve
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
note | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/time-off/{id}/approve" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"note":"string"}'Responses
200
POST/v1/time-off/{id}/cancelCancel
Cancel
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/time-off/{id}/cancel" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/time-off/{id}/rejectReject
Reject
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
note | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/time-off/{id}/reject" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"note":"string"}'Responses
200
POST/v1/time-off/accruals/runBring every balance up to date now (it also runs every hour)
Bring every balance up to date now (it also runs every hour)
Example
curl -X POST "https://ca-api.clocklap.com/v1/time-off/accruals/run" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/time-off/adjustmentsAdd or take away hours from someone's balance, with a reason
Add or take away hours from someone's balance, with a reason
Body (JSON)
| Name | Type | Description |
|---|---|---|
user_idrequired | string | |
leave_typerequired | "vacation" | "sick" | "personal" | |
hoursrequired | number | |
noterequired | string | |
date | string | |
kind | "adjustment" | "carryover" |
Example
curl -X POST "https://ca-api.clocklap.com/v1/time-off/adjustments" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id":"use_01J…","leave_type":"vacation","hours":1,"note":"string"}'Responses
200
GET/v1/time-off/balanceAllowance and days used this year
Allowance and days used this year
Query parameters
| Name | Type | Description |
|---|---|---|
user_id | string |
Example
curl "https://ca-api.clocklap.com/v1/time-off/balance" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/time-off/impactHours a request would use and what is left after it
Hours a request would use and what is left after it
Query parameters
| Name | Type | Description |
|---|---|---|
typerequired | "vacation" | "sick" | "personal" | "unpaid" | "other" | |
start_daterequired | string | |
end_daterequired | string | |
user_id | string | |
minutes_per_day | integer | |
request_id | string | A pending request being decided: its own hours are added back to what is available |
Example
curl "https://ca-api.clocklap.com/v1/time-off/impact" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/time-off/ledgerBalance history: accruals, time taken, adjustments, expiry (newest first)
Balance history: accruals, time taken, adjustments, expiry (newest first)
Query parameters
| Name | Type | Description |
|---|---|---|
user_id | string | |
leave_type | "vacation" | "sick" | "personal" | |
limit | integer |
Example
curl "https://ca-api.clocklap.com/v1/time-off/ledger" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/time-off/presetsAccrual starting points by province or country (not legal advice)
Accrual starting points by province or country (not legal advice)
Example
curl "https://ca-api.clocklap.com/v1/time-off/presets" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/time-off/settingsLeave types, accrual rules, holiday calendars and holiday pay (workspace or a location), with presets
Leave types, accrual rules, holiday calendars and holiday pay (workspace or a location), with presets
Query parameters
| Name | Type | Description |
|---|---|---|
location_id | string |
Example
curl "https://ca-api.clocklap.com/v1/time-off/settings" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
PUT/v1/time-off/settingsChange time off rules and holidays (merged into the workspace or location rules)
Change time off rules and holidays (merged into the workspace or location rules)
Body (JSON)
| Name | Type | Description |
|---|---|---|
location_id | string or null | |
time_off | object | |
time_off.vacation_days_per_year | number or null | |
time_off.sick_days_per_year | number or null | |
time_off.workday_h | number | |
time_off.paid_types | array of "vacation" | "sick" | "personal" | "unpaid" | "other" | |
time_off.accrual | object | |
time_off.preset | string or null | |
holidays | object | |
holidays.calendars | array of string (16 values) | |
holidays.pay | "none" | "flat_hours" | "ontario_formula" | |
holidays.flat_hours | number | |
holidays.premium_multiplier | number | |
inherit | array of string |
Example
curl -X PUT "https://ca-api.clocklap.com/v1/time-off/settings" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"location_id":"loc_01J…","time_off":{},"holidays":{"calendars":["ca"],"pay":"none","flat_hours":0,"premium_multiplier":1},"inherit":["string"]}'Responses
200