Entity Information (Request Data)
Data type: CheckInData, fields listData is passed in request as XML or Json serialized data depending on response-type header value.
URL /api/LoneWorker/{assetId}/CheckIn
HTTP Method: POST
Description
Inserts "Check In" message and optionally sets "Not checked in" alert interval
assetId (mandatory): Asset identifier
Request data has 5 fields in CheckInData structure posted as JSON or XML in request body:
- TerminalId - id of terminal to be updated. If terminalId is not specified it is detected automatically based on AssetId
- DurationSeconds - the number of seconds after "Check In" message, after which the "Not checked in" alert should be triggered if no other "Check In" or "Check out" message came in
- UtcDate - date/time in UTC timezone when "Check In" event occurred
- Latitude - the latitude of the location the event occurred on
- Longitude - the longitude of the location the event occurred on
If errors occured, the Trakopolis API server returns detailed error status with possible error codes:
- AssetMultipleTerminals - asset has multiple terminals and application should pass specific TerminalId to update value;
- AssetNotFound - requested asset is not found or can'be accessed by caller application;
- AssetNoTerminals - requested asset doesn't have any terminals;
- AssetTerminalNotFound - requested terminal is not found;
- TerminalNoLocationDateFound - failed to find existent status nearest to UtcDate. Probably terminal doesn't have any statuses yet.
- WrongDataFormat - Invalid input data format in VirtualOdometerData structure.