Known API gaps
Things the app design needs, or should rely on, that the API does not do today. Found while documenting feature/mobile-changes. Each needs a decision: build the screen without it, or change the backend first.
Security (fixed)
Eight access gaps found while writing these docs were fixed on feature/mobile-changes in commit 90cfb6e. They are listed so the app team knows what the server now refuses.
| # | Was | Now |
|---|---|---|
| S1 | Notifications accepted any user or notification id. | GetAllNotificationByUserId/{id} and ReadAllNotification/{id} refuse an id that is not the caller's (You can only read your own notifications.); UpdateNotification/{id} only marks the caller's own notifications (No Data Found otherwise). |
| S2 | Employee/CreateOrUpdateProfileImage trusted userId. | Own photo only (You can only change your own profile photo.). Admin may set photos of users in the same tenant. |
| S3 | Request/UpdateRequestStaus had no ownership check. | Only the request's creator, or Admin (same tenant). Others get Request Not Found. |
| S4 | Employee/UpdateEmployeeInfo updated any employee. | Own record only for non-admins (You can only update your own details.). Not used by the app. |
| S5 | User/ChangePassword returned the stored password hash. | password is always null in user responses. |
| S6 | User/ResetPasswordWithOTP matched the code alone, with no attempt limit. | The body must include userName; the code must belong to that user. After 5 wrong codes in 15 minutes the user's pending codes are cancelled and the call returns Too many wrong attempts. Please request a new OTP. until a new code is sent. |
| S7 | Investment declarations had no access check. | Non-admins create, edit, delete and view only their own (a missing employeeId means "me"). |
| S8 | Family members had no access check. | Non-admins add, edit and delete only their own family records. |
Missing features or data
| # | Needed for | Gap | Workaround |
|---|---|---|---|
| G1 | Approve/reject with a remark (S41) | Update…Status takes only ids and the new status. There is no remark field. | Approve/reject without a remark, or add a remark to UpdateTransactionStatusDto. |
| G2 | Approver sees the requester's leave balance (S41) | Report/GetLeaveBalanceDetails is self-only. | Hide that line, or add a team-scoped balance call. |
| G3 | Leave balance by year (S33 year switcher) | Report/GetLeaveBalanceDetails always returns the current year and month; date and month filters are ignored. | Show the current year only. |
| G4 | Leaders approving team missed punches (S40) | ThumbApplication/GetAllThumbApplications is self-only for non-admins, so leaders cannot list their team's pending punches (approving by id works). | Make the thumb list team-based for leaders (as leave/WFH), or leave punches out of the mobile inbox. |
| G5 | Team today (S42), team on leave (Home) | No endpoint lists a leader's team or the team's attendance or leave today. Employee/GetAllApprovableEmployees is the list of possible approvers, not the team. EmployeeDashboard/GetTeamLeaveApplication, despite its name, returns the caller's own leave applications (its stored procedure filters by the caller's employee id). | New endpoint; until then hide S42 and the "team on leave" card. |
| G6 | Assets assigned to me (S60) | AssetManagement/GetBranchAssetsByEmployeeId/{id} is Admin-only. | Hide the row, or add an employee endpoint. |
| G7 | Holiday working / comp-off (S31, P2) | No endpoint exists. HolidayApplication is the company holiday calendar, not comp-off. | Hide the type ("Coming soon"). |
| G8 | Notification inbox "All" tab | active/true returns unread, active/false returns read; there is no "all" call. Only the last 6 months. | Call both and merge. |
| G9 | Open the exact record from a push | The FCM data payload is always empty. | Open the inbox; use pageName + referenceNo from the row. |
| G10 | Several devices per user, logout | One FCM token per user; no logout endpoint to clear it. | Delete the FCM token on the device at logout. |
| G11 | Long sessions | Token lasts 24 h, no refresh endpoint. | Silent re-login with biometric-protected credentials (D3). |
| G12 | Update required (S83) | No minimum-app-version setting or endpoint. | Store version check, or add a setting. |
| G13 | Forgot password "code sent to ••••4821" | The OTP is sent by email, not SMS, and is 6 letters, not digits. | Change the copy to "Code sent to your email" and allow letters. |
| G14 | My shift (P3) | EmployeeShift/GetEmployeeShift/{id} needs a shift-assignment id, which the app does not have. | Use shift from Employee/GetEmployee. |
| G16 | Today card after an outside-geofence clock-in (S10 state B) | ClockInOut/ClockInOutInfo counts only Approved punches. A MobileQuick punch saved as Pending (outside the geofence, tenant default Pending) does not appear, and isClockIn stays false. | Keep the Pending punch from the clock-in response locally and show "Clocked in, pending approval"; or count Pending punches in the server. |
| G17 | Company documents (S50) | DocumentVault/GetActiveDocumentsVault filters by the employee's designation, but looks the employee up with the user id as if it were an employee id, so the designation match can be wrong. | Treat the list as company-wide; fix the lookup in DocumentVaultService. |
| G15 | Birthdays (S10) | AdminDashboard/GetUpCommingBirthDay returns the full birthDate including the year. | Show day and month only. |
Behaviour to design around
- No paging anywhere: always filter lists by date or month.
- HTTP 500 returns HTML, not JSON (developer exception page is on in every environment).
- Geofence radius is fixed at 200 m in server code (
PunchGeofenceService.RadiusMeters).