API Documentation
Complete REST API documentation for IceHRM Pro (API version 2.0.0).
Overview
IceHRM provides a REST API that allows you to integrate with external systems, build custom applications, and automate HR processes. The API exposes endpoints for managing employees, attendance, leave, payroll, projects, timesheets, expenses, and more.
Base URL
- Open Source/Pro:
http://your-icehrm-url.com/api/v1 - Cloud:
https://icehrm.com/api/v1/[instance-name]
The {protocol} (http or https) and {host} are configurable per deployment.
Authentication
All endpoints require Bearer token authentication unless otherwise noted. Use the OAuth token endpoint to obtain an access token, then include it in the Authorization header:
Authorization: Bearer [your-access-token]
See the Authentication section for details on obtaining a token.
Getting an API Token
You can obtain an access token in two ways:
- OAuth 2.0 password grant: POST credentials to
/oauth/token - Personal API Token: Generate from Personal Information -> Basic Information -> Api Access tab in the IceHRM web interface
Request Format
- All requests should use
Content-Type: application/json - Request bodies should be valid JSON
- Date fields use
YYYY-MM-DDformat - Date-time fields use
YYYY-MM-DD HH:MM:SSformat
Response Format
Successful responses return data wrapped in an IceResponse object:
{
"status": "SUCCESS",
"data": { ... }
}
Error responses use the format:
{
"error": [[{"code": 400, "message": "Error description"}]]
}
HTTP Status Codes
- 200 OK: Successful request
- 201 Created: Resource created successfully
- 204 No Content: Successful with no response body
- 400 Bad Request: Missing or invalid parameters
- 401 Unauthorized: Authentication failed
- 403 Forbidden: Access denied
- 404 Not Found: Resource not found
- 405 Method Not Allowed: HTTP method not supported
Available API Sections
📄️ Authentication API
Endpoints for user authentication and token management.
📄️ Employees API
Endpoints for managing employee records, profiles, skills, education, and related employee data.
📄️ Attendance API
Endpoints for managing attendance records, punch in/out, and tracking work-from-home status.
📄️ Leave API
Endpoints for managing leave requests, entitlements, and approval workflows.
📄️ Documents API
Endpoints for managing employee and company documents.
📄️ Timesheets API
Endpoints for managing weekly timesheets and individual time entries.
📄️ Expenses API
Endpoints for tracking and managing expenses, including receipt uploads optimized for mobile apps.
📄️ Projects API
Endpoints for project resource allocation and time tracking.
📄️ Teams API
Endpoints for managing teams, team membership, and viewing the user's own teams.
📄️ Company API
Endpoints for company structure, organization hierarchy, and company-wide overviews.
📄️ Charts API
Endpoints for dashboard analytics and chart data.
📄️ Meta API
Endpoints providing reference and lookup data such as countries, currencies, mobile modules, and installed extensions.
📄️ Settings API
Endpoints for reading and updating application settings.
📄️ Tasks API
Endpoints for managing task lists.
📄️ Directory API
Endpoints for the staff directory.
📄️ Insights API
Endpoints for analytics, statistics, and reporting insights across leave, attendance, and timesheets.
📄️ Payroll API
Endpoints for payroll configuration, processing, and payslip generation.
📄️ Company Assets API
Endpoints for tracking company-owned assets and their assignment to employees.
📄️ Learn API
Endpoints for the Learning Management System (courses, enrollment, and quizzes).
📄️ Recruitment API
Endpoints for job postings and candidate management.