-
Notifications
You must be signed in to change notification settings - Fork 3
Checkin API
Richard Thombs edited this page Feb 3, 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.
POST /api/user/calls/:id/checkins
Send a status update.
- id
- The Call ID that the user is sending a status update for.
{
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.
-
1Arrival - Marks the visit as "In progress" -
2Departure - Marks the visit as "Completed" (although the answers may not have been received yet) -
3Status 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
GET /api/calls/:id/checkins
List the checkins made against the call.
DELETE /api/calls/:id/checkins
Delete all the user's checkins for the call.