Approvals

Approve or decline pending leave requests

GET/api/v1/approvals/pending

List pending approvals

Returns leave requests awaiting the authenticated user's approval.

curl https://api.offly.net/api/v1/approvals/pending \
  -H "Authorization: Bearer YOUR_API_KEY"
Try it

Do not use production API keys on shared devices. Keys are stored in memory only.

POST/api/v1/approvals/{id}/approve

Approve a leave request

Parameters

Parameters

NameTypeInDescription
id*string(uuid)path

Response

FieldTypeDescription
idstring(uuid)
user_idstring(uuid)
leave_type_idstring(uuid)
statusstring
start_datestring(date)
end_datestring(date)
start_half_daystring| null
end_half_daystring| null
total_daysnumber
notestring| null
created_atstring(date-time)
curl -X POST https://api.offly.net/api/v1/approvals/{id}/approve \
  -H "Authorization: Bearer YOUR_API_KEY"
Try it

Do not use production API keys on shared devices. Keys are stored in memory only.

POST/api/v1/approvals/{id}/decline

Decline a leave request

Parameters

Parameters

NameTypeInDescription
id*string(uuid)path

Request body

FieldTypeDescription
reasonstringReason for declining

Response

FieldTypeDescription
idstring(uuid)
user_idstring(uuid)
leave_type_idstring(uuid)
statusstring
start_datestring(date)
end_datestring(date)
start_half_daystring| null
end_half_daystring| null
total_daysnumber
notestring| null
created_atstring(date-time)
curl -X POST https://api.offly.net/api/v1/approvals/{id}/decline \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Try it

Do not use production API keys on shared devices. Keys are stored in memory only.