Skip to main content
GET
/
leave-types
/
{id}
curl -X GET https://api.companyflow.com/leave-types/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "success": true,
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "company_id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Annual Leave",
    "code": "AL",
    "description": "Paid annual vacation time for all employees",
    "days_allowed": 20,
    "is_paid": true,
    "requires_documentation": false,
    "carry_forward_allowed": true,
    "max_carry_forward_days": 5,
    "color_code": "#3B82F6",
    "status": "active",
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T10:30:00Z"
  }
}
Get detailed information about a specific leave type configuration.

Authentication

Requires authentication with Bearer token. Available to:
  • Super Admin
  • HR Manager
  • Employee
  • Manager

Path Parameters

id
string
required
The unique identifier of the leave type (UUID format)Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Response

success
boolean
Indicates if the request was successful
data
object
The leave type object
curl -X GET https://api.companyflow.com/leave-types/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "success": true,
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "company_id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Annual Leave",
    "code": "AL",
    "description": "Paid annual vacation time for all employees",
    "days_allowed": 20,
    "is_paid": true,
    "requires_documentation": false,
    "carry_forward_allowed": true,
    "max_carry_forward_days": 5,
    "color_code": "#3B82F6",
    "status": "active",
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T10:30:00Z"
  }
}

Use Cases

This endpoint is useful for:
  • Displaying leave type details in a form before submitting a leave request
  • Showing leave policies to employees
  • Verifying leave type configuration
  • Building leave request interfaces
All authenticated employees can view leave type details, but only Super Admin and HR Manager roles can modify leave types.

Build docs developers (and LLMs) love