Getting started
Base URLs
| Environment | Base URL | Notes |
|---|---|---|
| Production | https://api-hrms.weblancertechnologies.com/api | Release builds |
| Staging | https://api-hrms-stg.weblancertechnologies.com/api | Test builds and internal testing |
| Local | http://10.0.2.2:5000/api | dotnet run in HRMS.WebAPI; 10.0.2.2 is the host machine from the Android emulator. On a device run adb reverse tcp:5000 tcp:5000 and use http://localhost:5000/api. |
Every route in this documentation is relative to the base URL, which already ends in /api. For example login is POST {BASE_URL}/User/LoginAuthenticate.
In HRMS.Mobile the base URL comes from .env.development, .env.staging and .env.production (API_BASE_URL).
Headers
| Header | Value | When |
|---|---|---|
Content-Type | application/json | Every request with a body |
Accept | application/json | Every request |
Authorization | Bearer <token> | Every endpoint marked Bearer token (all except login, forgot password and a few public ones). The token comes from login. |
There is no API key, tenant header or company header. The tenant, company and employee all come from the token.
Your first call
curl -X POST "https://api-hrms-stg.weblancertechnologies.com/api/User/LoginAuthenticate" \
-H "Content-Type: application/json" \
-d '{ "userName": "9876544821", "password": "your-password", "fcmToken": null }'
A successful response:
{
"isSuccess": true,
"responseData": {
"id": 87,
"fullName": "Priya Sharma",
"userName": "9876544821",
"profileImageUri": "https://…/profile.jpg",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
"employeeId": 142,
"designationName": "Senior Site Engineer",
"isClarify": false,
"isJobSeeker": false,
"isPasswordChange": true,
"isApprover": true
},
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}
Keep token (send it on every other call), id (the user id) and employeeId (the employee id). Some endpoints want one, some the other; each endpoint page says which.
Using the HRMS.Mobile API client
HRMS.Mobile/src/services/api already does the plumbing: it adds the token, unwraps the envelope (returns responseData or throws ApiError with the server's message), and re-logs in once on HTTP 401. Feature code calls it like this:
import { api } from '@/services/api';
const leaves = await api.post<LeaveApplicationDto[]>('LeaveApplication/GetAllLeaveApplications', {
employeeIds: null,
applicationStatus: -1,
fromDate: null,
toDate: null,
});
Every endpoint page has a TypeScript (HRMS.Mobile) tab with the exact call.
Integration checklist
- Read Conventions: camelCase, numeric enums, IST wall-clock dates,
"YYYYMM"months. - Handle the envelope and errors:
isSuccess: falsearrives with HTTP 200. - Implement session handling: 24-hour token, forced password change, biometric re-login.
- Check Server rules for every screen that creates, edits or approves something.
- Check Known API gaps before building a screen that depends on one.