Skip to content
Richard Thombs edited this page Jul 28, 2014 · 15 revisions

Checkins allow a user to send status updates about a specific call to the server without having to complete the call itself.

Checkins are intended to be delivered asynchronously, in the background rather than being batched up and sent as part of a TeamHaven Mobile synchronisation process. The intended use case is to provide close to real-time information to office staff about where reps are and which calls are underway.

POST /api/user/calls/:id/checkins

Send a status update.

URL parameters

id
The Call ID that the user is sending a status update for

Body

{
  Type: 1,
  Date: '2013-02-01T14:49:40.223',
  LatLng: { Lat: 52.5, Lng: 0.2 },
  Message: 'Arrived at store'
}
Type
The type of checkin being posted:
  • 1 Arrival - Marks the visit as "In progress"
  • 2 Departure - Marks the visit as "Completed" (although the answers may not have been received yet)
  • 3 Status update
Date
Optional UTC date and time of the checkin.
LatLng
An optional object giving the latitude and longitude of the user's current position.
Message
An optional message
GET /api/calls/:id/checkins

List the checkins made against the call.

DELETE /api/user/calls/:id/checkins

Delete all the user's checkins for the call.

Clone this wiki locally