Skip to main content

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-DD format
  • Date-time fields use YYYY-MM-DD HH:MM:SS format

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