Field Staff Tracking
Scheduler & Background Jobs
API Endpoints Reference

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

EndpointMethodDescription
GetSVGPSByUserId/{id}GETGet GPS records by user (role-based filtering)
GetSiteVisitGPSAPIById/{id}GETGet specific GPS record by SiteVisitGPSID
GetSiteVisitGPSAPI/{id}GETGet today's GPS record for a user
Create_SiteVisit_GPSGETCreate a new GPS check-in record
Update_SiteVisit_GPS_ClosedGETClose a GPS record (check-out)
SaveReportOnDutyPOSTCombined check-in/check-out with attendance
SaveReportOnDutyLocationPOSTUpdate location waypoint for a visit
SaveReportOnDutyImagePOSTUpload geo-tagged photo
SaveLocationOfUserPOSTBackground continuous location tracking
UpdateLocationServiceStatusGETReport GPS enabled/disabled status
LoadCallLog/{UserId}GETLoad call log dropdown for visit linking

Attendance Endpoints

AttendanceAPIController

EndpointMethodDescription
GetAttendanceApprovalListGETList pending approvals with date and type filters
GetMobileAttendanceById/{id}GETGet specific mobile attendance record
SaveAttendanceApprovalPOSTSubmit approval or rejection
GetAttendanceApprovalStatusGETGet valid attendance type options
GetMobileAttendanceApprovalCount/{UserId}GETCount pending approvals for a user
GetFollowupCallsCountForAttendanceRestriction/{UserId}GETCount pending follow-up calls
GetFollowupCountForAttendanceRestriction/{UserId}GETCount pending follow-up approvals
GetAttendanceRestrictionForUser/{UserId}GETFull list of attendance restrictions
UpdateSalesForceToken/{id}GETUpdate push notification token

Modern API Endpoints

Go Core API

EndpointMethodDescription
GET /api/marketing/siteVisitGPSListGETList GPS records with search, limit, userId, mode filters
POST /api/integration/attendance-postPOSTPost 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 LayerAuth Method
ASP.NET WebAPI[Authorize] attribute — Bearer token authentication
Go Core APIRequest 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.