API Endpoints Reference
Complete reference of all API endpoints powering the field staff tracking system, spanning the legacy ASP.NET WebAPI and the modern Go core API.
API Architecture
GPS Tracking Endpoints
SiteVisitGPSAPIController
| Endpoint | Method | Description |
|---|---|---|
GetSVGPSByUserId/{id} | GET | Get GPS records by user (role-based filtering) |
GetSiteVisitGPSAPIById/{id} | GET | Get specific GPS record by SiteVisitGPSID |
GetSiteVisitGPSAPI/{id} | GET | Get today's GPS record for a user |
Create_SiteVisit_GPS | GET | Create a new GPS check-in record |
Update_SiteVisit_GPS_Closed | GET | Close a GPS record (check-out) |
SaveReportOnDuty | POST | Combined check-in/check-out with attendance |
SaveReportOnDutyLocation | POST | Update location waypoint for a visit |
SaveReportOnDutyImage | POST | Upload geo-tagged photo |
SaveLocationOfUser | POST | Background continuous location tracking |
UpdateLocationServiceStatus | GET | Report GPS enabled/disabled status |
LoadCallLog/{UserId} | GET | Load call log dropdown for visit linking |
Attendance Endpoints
AttendanceAPIController
| Endpoint | Method | Description |
|---|---|---|
GetAttendanceApprovalList | GET | List pending approvals with date and type filters |
GetMobileAttendanceById/{id} | GET | Get specific mobile attendance record |
SaveAttendanceApproval | POST | Submit approval or rejection |
GetAttendanceApprovalStatus | GET | Get valid attendance type options |
GetMobileAttendanceApprovalCount/{UserId} | GET | Count pending approvals for a user |
GetFollowupCallsCountForAttendanceRestriction/{UserId} | GET | Count pending follow-up calls |
GetFollowupCountForAttendanceRestriction/{UserId} | GET | Count pending follow-up approvals |
GetAttendanceRestrictionForUser/{UserId} | GET | Full list of attendance restrictions |
UpdateSalesForceToken/{id} | GET | Update push notification token |
Modern API Endpoints
Go Core API
| Endpoint | Method | Description |
|---|---|---|
GET /api/marketing/siteVisitGPSList | GET | List GPS records with search, limit, userId, mode filters |
POST /api/integration/attendance-post | POST | Post mobile attendance punch |
Go API Input Schema
{
"search": "string",
"limit": 50,
"userId": 1234,
"mode": "all"
}Go API Output Schema
{
"items": [
{
"siteVisitGPSID": 8901,
"refNo": "SV-2025-001",
"purpose": "Follow Up CP",
"remarks": "Client visit",
"startingDateAndTime": "2025-01-15T09:30:00Z",
"endingDateAndTime": "2025-01-15T11:45:00Z",
"isApproved": true,
"userName": "John Doe",
"startingLocation": "MG Road, Chennai",
"endingLocation": "Anna Nagar, Chennai",
"noOfLocation": 15,
"noOfImages": 3,
"totalDuration": "02:15:00"
}
]
}Authentication
| API Layer | Auth Method |
|---|---|
| ASP.NET WebAPI | [Authorize] attribute — Bearer token authentication |
| Go Core API | Request context with user session |
| MVC Controllers | [Authorize] — Cookie-based session auth |
Note: The SiteVisitGPSAPIController does not have the [Authorize] attribute at the class level, though individual methods may still require authentication through the mobile app's token-based auth.