Skip to main content

Getting started

Base URLs​

EnvironmentBase URLNotes
Productionhttps://api-hrms.weblancertechnologies.com/apiRelease builds
Staginghttps://api-hrms-stg.weblancertechnologies.com/apiTest builds and internal testing
Localhttp://10.0.2.2:5000/apidotnet 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​

HeaderValueWhen
Content-Typeapplication/jsonEvery request with a body
Acceptapplication/jsonEvery request
AuthorizationBearer <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: false arrives 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.