Entity Information

Data type: Status, fields list

URL: api/statuses

HTTP Method: POST

All query parameters are ignored for create operation.

To send status to the Trakopolis API server you need to pass XML or JSON-serialized Status object with following values:

  • CreatedOn: Datetime of message creation. UTC timezone only
  • MessageCode: Message code. Must be equal to one of message codes
  • Latitude: Latitude
  • Longitude: Longitude
  • Terminal: Optional. Information about terminal. Either Terminal.Id or Terminal.SerialNumber should be filled
  • AssetId: Optional. Asset Identifier. If terminal is not specified the Trakopolis API server tries to detect terminal automatically by assetId
  • Fuel: Optional. Information about fuel value (in liters)
  • AnalogSensorDatas: Optional. Analog sensors data
  • DigitalSensorDatas: Optional. Digital sensors data
  • ExtraDatas: Optional. Extra data: OBD2, J1939 or Trakopolis custom attributes.

The Trakopolis API server uses TerminalId to find target terminal. If Terminal Id is unknown, then Terminal is detected by serial number. If serial number is not specified as well the Trakopolis API server detects terminal by AssetId. If AssetID is not specified or terminal was not found, an error is returned.

There is a delay before status becomes available on the Trakopolis website and API server. The Trakopolis API server returns ApiStatusResult response if status is added successfully (Error code = NoError) or custom error code if an error has ocurred. Some errors may cause 4xx Http status code result. Please refer to the "Error Handling" section

Insert fuel information

Fuel volume information can be added during creation of new status. To insert fuel, the Trakopolis API server requires that status object has message code equal to "Fuel Log" and fuel object has non-empty Fuel.ValueInLiters property with numeric value.

Insert sensors and extra data

New status entry can have analog sensors, digital sensors or extra data like OBD2 DTC, OBD2 PID, J1939 or Trakopolis custom attributes. Please refer to the "Sensors and Extra Data" section to get more details and requests examples. 

Json-based request example (by TerminalId):

{
   "TerminalId": 1234,
   "Latitude": 51.04917,
   "Longitude": -114.06083,
   "MessageCode": "Ping",
   "CreatedOn": "2013-01-01T00:00:00.00000000Z"
 }					

Json-based request example (by Terminal Serial number):

{
   "Terminal": {
     "SerialNumber": "0-12345678"
   },
   "Latitude": 51.04917,
   "Longitude": -114.06083,
   "MessageCode": "Ping",
   "CreatedOn": "2013-01-01T00:00:00.00000000Z"
 }					

Json-based request example with fuel value:

{
   "TerminalId": 1234,
   "Latitude": 51.04917,
   "Longitude": -114.06083,
   "MessageCode": "Fuel Log",
   "CreatedOn": "2013-01-01T00:00:00.00000000Z",
   "Fuel": {
     "ValueInLiters": 100.23
    }
 }