The Location methods allow you to access the most recent Location transmissions of Devices available to your account..
The following datatype will be JSONified and returned for methods which retrieve Location values.
public | UInt64 | AccountId; | // The AccountId associated with the Device |
public | UInt64 | DeviceId; | // The DeviceId associated with the Device |
public | String | DeviceName; | // The name of the Device at the time of the location transmission |
public | Double | Latitude; | // The Latitude of the Device at the time of the location transmission |
public | Double | Longitude; | // The Longitude of the Device at the time of the location transmission |
public | Int32 | Heading; | // The Heading of the Device at the time of the location transmission, in degrees |
public | Int32 | Velocity; | // The Velocity of the Device at the time of the location transmission, in MPH |
public | Int32 | Satellites; | // The number of satellites available to the Device at the time of transmission. Most Devices will only transmit when there are at least four. |
public | Int32 | Ignition; | // The Ignition state of the Device at the time of transmission |
public | DateTime? | LastMoved; | // The last time the Device had detectably moved, at the time of the location transmission. NOTE: Presently this is returned as null for history immediatereports. |
public | DateTime | LastUpdated; | // The last time the Device had sent an update status, at the time of the location transmission. This will almost always be the time of the location transmission. |
public | UInt32 | OutputFlags; | // This contains raw output information for devices with PTO/Ignition/Panic capabilities. |
public | Int32 | Power; | // This contains the power reported by the unit, usually from 0 to 100 |
The following list provides a reference for all valid /Location HTTP requests.
Summary: Gets the last reported location of a specific Device in your Account.
Returns: The requested Device's last reported location.
Parameters:
- id: Id of the Device to look up. (FromUri)
- account: (Optional) If this parameter is included, the method will be run on behalf of the specified child Account (if valid). (FromUri)
Summary: Gets the last reported location of all Devices in your Account.
Returns: A list of DeviceLocations corresponding to their last report
Parameters:
- from: (Optional) Only returns devices updated after this 'from' date. (UTC Format) (FromUri)
- account: (Optional) If this parameter is included, the method will be run on behalf of the specified child Account (if valid). (FromUri)
Summary: Updates the location of a Device in your account. Returns 404 if the device is not found.
Returns: Will return a body of True for successful requests, and a body detailing the error for unsuccessful requests.
Parameters:
- Location: A JSONified representation of the Location structure for this update. If DeviceName is specified, it will be used for this update, but not permanently recorded for the Device. To permanently change the name of a device, use the /Device methods. (FromBody)
- account: (Optional) If this parameter is included, the method will be run on behalf of the specified child Account (if valid). (FromUri)