Approve or decline pending leave requests
/api/v1/approvals/pendingReturns leave requests awaiting the authenticated user's approval.
curl https://api.offly.net/api/v1/approvals/pending \
-H "Authorization: Bearer YOUR_API_KEY"Do not use production API keys on shared devices. Keys are stored in memory only.
/api/v1/approvals/{id}/approve| Name | Type | In | Description |
|---|---|---|---|
| id* | string(uuid) | path |
| Field | Type | Description |
|---|---|---|
| id | string(uuid) | |
| user_id | string(uuid) | |
| leave_type_id | string(uuid) | |
| status | string | |
| start_date | string(date) | |
| end_date | string(date) | |
| start_half_day | string| null | |
| end_half_day | string| null | |
| total_days | number | |
| note | string| null | |
| created_at | string(date-time) |
curl -X POST https://api.offly.net/api/v1/approvals/{id}/approve \
-H "Authorization: Bearer YOUR_API_KEY"Do not use production API keys on shared devices. Keys are stored in memory only.
/api/v1/approvals/{id}/decline| Name | Type | In | Description |
|---|---|---|---|
| id* | string(uuid) | path |
| Field | Type | Description |
|---|---|---|
| reason | string | Reason for declining |
| Field | Type | Description |
|---|---|---|
| id | string(uuid) | |
| user_id | string(uuid) | |
| leave_type_id | string(uuid) | |
| status | string | |
| start_date | string(date) | |
| end_date | string(date) | |
| start_half_day | string| null | |
| end_half_day | string| null | |
| total_days | number | |
| note | string| null | |
| created_at | string(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 '{}'Do not use production API keys on shared devices. Keys are stored in memory only.