Leave Types
Update Leave Type
Update an existing leave type configuration
PUT
Update the configuration of an existing leave type. Both PUT and PATCH methods are supported. This endpoint allows you to modify leave policies, allowances, and other settings.
Authentication
Requires authentication with Bearer token. Available to:- Super Admin
- HR Manager
Path Parameters
string
required
The unique identifier of the leave type (UUID format)Example:
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"Request Body
All fields are optional. Only include the fields you want to update.string
Name of the leave typeExample:
"Annual Leave (Updated)"string
Short code for the leave typeExample:
"AL"string
Detailed description of the leave typeExample:
"Updated policy for annual vacation time"number
Total number of days allowed per yearExample:
22boolean
Whether this leave type is paid or unpaidExample:
trueboolean
Whether documentation is requiredExample:
trueboolean
Whether unused days can be carried forwardExample:
truenumber
Maximum number of days that can be carried forwardExample:
10string
Hex color code for calendar displayExample:
"#10B981"string
Status of the leave type:
active or inactiveExample: "active"Response
boolean
Indicates if the request was successful
object
The updated leave type object
PATCH vs PUT
This endpoint supports both HTTP methods:- PUT: Update specific fields (partial update)
- PATCH: Update specific fields (partial update)