Events

Create Field Event

Record a field sales event such as a check-in or check-out at an outlet. Only event, event_timestamp, and user_id are required. All other fields are optional.

Fields

Payload FieldReference FieldType
eventdetermines tcpl_checkIn__c/tcpl_checkOut__cEnum
event_timestamptcpl_checkIn__c or tcpl_checkOut__cDateTime (ISO 8601 UTC)
user_idtcpl_salesRep__cString
outlet_idtcpl_beatPlanOutlet__cString
latitudetcpl_GeolocationCaptured__Latitude__sString (Decimal 18,15)
longitudetcpl_GeolocationCaptured__Longitude__sString (Decimal 18,15)
visit_typetcpl_visitType__cPicklist
geo_adherencetcpl_Geo_Adherence__cBoolean
beat_idtcpl_Beat_Master__cString
outlet_geo_changetcpl_OultetGeoChange__cString

IMPORTANT: Latitude and Longitude must be STRINGS

Send coordinates as quoted strings to preserve full decimal precision.

  • Correct: "latitude": "28.613929500000000"
  • Incorrect: "latitude": 28.613929500000000 (precision lost due to float conversion)

Visit Type Allowed Values (case-sensitive)

  • Joint Visit
  • Visit
  • Sub DB Check-In
  • Pragati DB Check-In
  • RPD DB Check-In
  • DB Check-In
  • Super DB Check-In
  • Jump call

Example Request

{
  "event": "CHECK_IN",
  "event_timestamp": "2026-02-12T08:00:55.944Z",
  "user_id": "+91 2222222222",
  "outlet_id": "a1JTE000000cU1w2AE",
  "latitude": "13.0378136",
  "longitude": "77.6167799",
  "visit_type": "Visit",
  "geo_adherence": false,
  "beat_id": "a10TE000000fQeTYAU",
  "outlet_geo_change": "RequestBypass"
}
post/api/v1/events

Request body

event'CHECK_IN' | 'CHECK_OUT' required

Supported field event types.

event_timestampstring date-time required

ISO 8601 date-time in UTC. Examples: '2026-02-11T09:08:18.000Z', '2024-01-15T10:30:00Z'

user_idstring required

DSR / sales rep identifier (phone number with country code). Example: '+91 1234123412'

outlet_idstring nullable

Beat plan outlet identifier.

latitudestring nullable

Latitude coordinate as STRING to preserve precision. Decimal(18,15): up to 3 digits before decimal, up to 15 after. Example: '28.613929500000000'

longitudestring nullable

Longitude coordinate as STRING to preserve precision. Decimal(18,15): up to 4 digits before decimal, up to 15 after. Example: '77.209015500000000'

visit_type'Joint Visit' | 'Visit' | 'Sub DB Check-In' | 'Pragati DB Check-In' | 'RPD DB Check-In' | 'DB Check-In' | 'Super DB Check-In' | 'Jump call'

Allowed visit types. Maps to tcpl_visitType__c picklist. Case-sensitive.

geo_adherenceboolean nullable

Whether the visit location is within allowed geo radius.

beat_idstring nullable

Beat master identifier.

outlet_geo_changestring nullable

Outlet geo-fence change request status. Example: 'RequestBypass'

mavic_user_idstring nullable

Mavic platform user identifier.

Example request

{
  "beat_id": "a10TE000000fQeTYAU",
  "event": "CHECK_IN",
  "event_timestamp": "2026-02-12T08:00:55.944Z",
  "geo_adherence": false,
  "latitude": "13.0378136",
  "longitude": "77.6167799",
  "outlet_geo_change": "RequestBypass",
  "outlet_id": "a1JTE000000cU1w2AE",
  "user_id": "+91 2222222222",
  "visit_type": "Visit"
}

Response

Successful Response

successboolean

Event logged successfully

messagestring required

Confirmation message

neo_user_idstring nullable

Resolved NeoSapien user ID. Present for CHECK_IN/CHECK_OUT events.

Changes

No recorded changes to this endpoint across all 1 revision of this API.