Skip to content
Richard Thombs edited this page Sep 16, 2015 · 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.

Create a checkin

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
Optional type of checkin being posted. If omitted, then `Status update` is assumed.
  • 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. If omitted, then the current UTC time is used.
LatLng
An optional object giving the latitude and longitude of the user's current position.
Message
An optional message

List the checkins made against a Call

GET /api/calls/:id/checkins

Delete the checkins made against a Call

DELETE /api/calls/:id/checkins

This will delete all the checkins that the logged in user has made against a Call. It is intended to provide a way of resetting the Call when the user mistakenly checks into the wrong one.

Clone this wiki locally