Basic Information

Detailed Information

Report Data

The Location Datatype

The following datatype will be JSONified and returned for methods which retrieve Location values.

public class DeviceLocation
{
publicUInt64AccountId; // The AccountId associated with the Device
publicUInt64DeviceId; // The DeviceId associated with the Device
publicStringDeviceName; // The name of the Device at the time of the location transmission
publicDoubleLatitude; // The Latitude of the Device at the time of the location transmission
publicDoubleLongitude; // The Longitude of the Device at the time of the location transmission
publicInt32Heading; // The Heading of the Device at the time of the location transmission, in degrees
publicInt32Velocity; // The Velocity of the Device at the time of the location transmission, in MPH
publicInt32Satellites; // The number of satellites available to the Device at the time of transmission. Most Devices will only transmit when there are at least four.
publicInt32Ignition; // The Ignition state of the Device at the time of transmission
publicDateTime?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.
publicDateTimeLastUpdated; // 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.
publicUInt32OutputFlags; // This contains raw output information for devices with PTO/Ignition/Panic capabilities.
publicInt32Power; // This contains the power reported by the unit, usually from 0 to 100
}

The Location Methods

The following list provides a reference for all valid /Location HTTP requests.

  • GET v1/Location/{id}?account={account}

    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)
  • GET v1/Location?from={from}&account={account}

    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)
  • PUT v1/Location?account={account}

    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)