The Asset Status is a read-only API that provides near real-time information from the most recent communication between the mobile devices of the Drivers and Hours of Service servers for the status of an Asset. It is used to update the position of the Asset (and the Driver using it) on a map that can be seen in the Portal’s Locations tab.
Fields
Tag | Data Type | Required | Description |
accountId | Long | Auto | The id of the Account that owns this record. |
assetId | Long | Auto | The id of the Asset that is tied to this status. |
eventTime | Text | Auto | Indicates when the last event occurred for this Asset. Note: Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z) |
id | Auto-incremented Long | Auto | Unique Identifier. |
latitude | Double Precision | Auto | Indicates the latitude coordinate of the location where the Asset was last tracked. |
location | Character (255) | Auto | Contains the address of the location where the Asset was last tracked. |
longitude | Double Precision | Auto | Indicates the longitude coordinate of the location where the Asset was last tracked. |
position | Text | Auto | The pair of coordinates indicating the location where the Asset was last tracked. |
totalEngineHours | Interval | Auto | The number of hours the engine of this Asset has been running when it was last tracked. |
totalOdometerKm | Double Precision | Auto | The odometer of the Asset in kilometers at the time when it was last tracked. |
userId | Long | Auto | The id of the Driver that is tied to this status. |
Read
API PATH: | /api/v2/assetStatuses |
METHOD: | GET |
PARAMETERS: | user-id – Retrieves matching records for a specific User (e.g. user-id=1268897, all Drivers by default) asset-id – Retrieves matching records for a specific Asset (e.g. asset-id=1362590, all Assets by default) offset – Retrieves matching records after an offset value (e.g. offset=2) limit – Retrieves a number of records per page specified by the value (e.g. limit=10) |
SORTING: | sort=id – Sort records by their id field in ascending order (DEFAULT) sort=-id – Sort records by their id field in descending order |
QUERY STRING EXAMPLES: | Get the asset status with the specified id: api/v2/assetStatuses/831 Get two asset statuses of the current account with an offset of 1 : ?offset=1&limit=2 |
EXAMPLE RESPONSE: |
[ { "userId": 1268897, "assetId": 1362590, "position": "POINT (-87.6235815 41.8911622)", "longitude": -87.6235815, "latitude": 41.8911622, "eventTime": "2017-09-07T07:40:31.602Z", "totalOdometerKm": 851.53, "totalEngineHours": "PT308606400S", "location": "160 E Illinois St, Chicago, IL 60611, USA", "accountId": 1250232, "id": 831 } ] |
API error calls
ERROR MESSAGE | POSSIBLE CAUSES |
Post is not supported for this api | POST method is not allowed |
Put is not supported for this api | PUT method is not allowed |
Delete is not supported for this api | DELETE method is not allowed |