Entity Information (Request Data)

Data type: VirtualOdometerData, fields list

Data is passed in request as XML or Json serialized data depending on response-type header value.


  • /api/assets/{assetId}/setvirtualodometer

HTTP Method: PUT


Sets value for virtual odometer for given asset and triggers related calculations

assetId (mandatory): Asset identifier

Request data has 3 fields in VirtualOdometerData structure:

  • OdometerMeters - odometer value in meters
  • UtcDate - date/time in UTC timezone when odometer value was measured
  • TerminalId - id of terminal to be updated. If terminalId is not specified it is detected automatically based on AssetId

The Trakopolis API server finds existent terminal status, nearest to UtcDate passed and assign odometer value to this status. If TerminalId is not specified and given asset doesn't have any terminals or have more than 1 terminal, an error will be returned.

If errors occured during updating odometer, 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.