Create, approve and track time off
/api/v1/leave-requestsReturns leave requests for the authenticated user (or all if admin).
| Name | Type | In | Description |
|---|---|---|---|
| status | string | query | |
| user_id | string(uuid) | query | Filter by user (admin only) |
curl https://api.offly.net/api/v1/leave-requests \
-H "Authorization: Bearer YOUR_API_KEY"Do not use production API keys on shared devices. Keys are stored in memory only.
/api/v1/leave-requestsCreates a new leave request for the authenticated user.
| Field | Type | Description |
|---|---|---|
| leave_type_id* | string(uuid) | |
| start_date* | string(date) | |
| end_date* | string(date) | |
| start_half_day | string | |
| end_half_day | string | |
| note | string |
| 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/leave-requests \
-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.
/api/v1/leave-requests/{id}| 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 https://api.offly.net/api/v1/leave-requests/{id} \
-H "Authorization: Bearer YOUR_API_KEY"Do not use production API keys on shared devices. Keys are stored in memory only.
/api/v1/leave-requests/{id}Edits a pending leave request.
| Name | Type | In | Description |
|---|---|---|---|
| id* | string(uuid) | path |
| Field | Type | Description |
|---|---|---|
| start_date | string(date) | |
| end_date | string(date) | |
| start_half_day | string| null | |
| end_half_day | string| null | |
| note | string |
| 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 PATCH https://api.offly.net/api/v1/leave-requests/{id} \
-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.
/api/v1/leave-requests/{id}/cancelCancels a pending or approved leave request.
| 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/leave-requests/{id}/cancel \
-H "Authorization: Bearer YOUR_API_KEY"Do not use production API keys on shared devices. Keys are stored in memory only.