Skip to main content

Conventions

Response envelope​

Every endpoint the app uses returns HTTP 200 with this wrapper (HRMS.WebAPI/Shared/ApiResponse.cs):

{
"isSuccess": true,
"responseData": { },
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}
FieldTypeMeaning
isSuccessbooleantrue when the call worked. Check this, not the HTTP status.
responseDatadepends on the endpointThe data. On failure it is the type's default: null for objects/lists/strings, false for booleans, 0 for numbers.
errorCodeinteger0 on success, 1 = Validation (show errorMessage to the user), 2 = Error (server problem).
errorMessagestring | nullUser-facing message when isSuccess is false.
errorTitlestringUsually "".

See Errors for every failure shape, including HTTP 401 and 500.

JSON naming​

  • Property names are camelCase: the API uses ASP.NET Core with Newtonsoft's default camelCase resolver. EmployeeId → employeeId, ITMethodId → itMethodId, PAN → pan. The names on every endpoint page are already converted.
  • Request bodies use the same names. Unknown fields are ignored; missing fields get the C# default (0, false, null, or the default shown in the DTO).

Enums​

Enums are sent and received as numbers, not strings. Each endpoint page lists the values next to the field, and Types and enums lists them all. The ones used everywhere:

EnumValues
TransactionStatus (application status)0 Pending · 1 Approved · 2 Rejected
ThumbApplicationType (punch type)1 In · 2 Out
ThumbSource (punch source)0 Desktop · 1 Mobile (missed-punch request) · 2 MobileQuick (clock in/out) · 3 ThumbMachine
ThumbApplicationFromType (where working)1 Office · 2 Project site · 3 Other site
RequestStatus (helpdesk)0 Pending · 1 In progress · 2 Completed · 3 Cancelled

The server also exposes these lists through CommonEnumValues if you prefer to load them.

Dates and times​

  • The server works in server-local time (IST, UTC+05:30) and stores wall-clock values without an offset (it uses DateTime.Now).
  • Send date-times as local wall-clock time without an offset: "2026-11-23T09:42:00". Do not convert to UTC. (The web app sends the local wall-clock time with a Z suffix; the server reads both the same way.)
  • Date-only fields: send "2026-11-23T00:00:00".
  • Received date-times have no offset, for example "2026-11-23T09:42:00". Treat them as IST wall-clock time.
  • Months in report filters and payroll (fromMonth, toMonth, salaryMonth, payMonth) are strings "YYYYMM", for example "202610" for October 2026.
  • Display formats from the design brief: 24 Nov 2026, 09:42 AM. HRMS.Mobile/src/utils/date.ts has the helpers (toApiDateTime, formatDate, formatTime).

IDs​

IdWhere you get itUsed by
User idresponseData.id from loginNotifications (GetAllNotificationByUserId/{id}, ReadAllNotification/{id}), change password (id), profile photo (userId)
Employee idresponseData.employeeId from loginEvery application (employeeId in leave, WFH, punches, …)
Record idid of a leave, punch, request, …Get by id, edit (id in the body), delete, approve (ids)

id: null or id: 0 in a CreateOrUpdate… body creates a record; any other value updates it.

The filter object: TransactionApplicationDto​

Most list and report endpoints are POST and take the same filter object. Only a few fields matter for the app:

FieldSendMeaning
employeeIdsnullLeave it null. The server fills it from your token: yourself, or yourself plus your team for team-based lists (see Server rules). Ids outside your scope are ignored.
applicationStatus-1 or null for all, 0/1/2 for Pending/Approved/RejectedApplication lists only.
fromDate, toDatedate-time or nullApplication lists: filter by the application's dates. null = no limit.
fromMonth, toMonth"YYYYMM"Reports that are per month (attendance, monthly salary).
tenantId, companyIdsomitAlways overwritten by the server from your token.

All other fields (branchIds, departmentIds, …) are admin report filters; leave them out.

Lists and paging​

There is no paging on any endpoint. Lists come back complete, so always filter by date or month where the endpoint allows it.

Booleans as path segments​

A few routes take values in the path, for example Notification/GetAllNotificationByUserId/87/active/true. Send true/false in lowercase.