Skip to main content

Get Vehicle Location Status by Group

GET 

/vehicles/status/location/by-vehicle-group

Returns the latest location status data for each vehicle under a specific vehicle group.

Note: If it seems that you are receiving duplicate records it is because a vehicle may be fitted with multiple GPS device/tracking units. In order to only see the data of the primary device (recommended as backup devices often have less data available) you can add the ?unit_assigned_as=primary filtering parameter, for example:

/api/v1/vehicles/status/location/by-client/all?unit_assigned_as=primary

The request returns an array of objects having the following fields:

  • id (int): The vehicle's database id.

  • reg_no (string): Vehicle's registration number.

  • fleet_no (string|null): Vehicle's fleet number.

  • vehicle_make (string|null): Vehicle's make.

  • vehicle_model (string|null): Vehicle's model.

  • client_name (string): Client/customer name.

  • driver_name (string|null): Active or assigned Driver name.

  • vehicle_group_name (string|null): Vehicle's group name.

  • unit_assigned_as (string): Can be primary, backup_1, backup_2.

  • local_time (ISO 8601 date and time string|null): The local time of the GPS recording, local meaning the timezone where the GPS device finds itself in. It can be null if no GPS data has been captured by the device yet.

  • timezone (string): The configured/active timezone of the GPS device.

  • latitude (float): The decimal latitude in degrees.

  • longitude (float): The decimal longitude in degrees.

  • speed (int|float): The current GPS speed in km/h.

  • heading (int|float): The current GPS heading in degrees where 0 = North.

  • gps_fix (array of strings): Can be an empty array or have a combination of the following values: "fixed", "predicted", "diff_corrected", "last_known", "2d", "logged", "invalid_time", "on_no_fix", "sleep". In most cases the array will be empty or only contain "on_no_fix" if there is no GPS fix.

  • odometer (int): Odometer in meters. This is currently only availble if the GPS device is configured to supply the odometer, returns 0 if no odometer is available.

  • address (int|null): Current address of the vehicle if available.

  • hours_behind (float): Can be used to determine how long ago the device transmitted a GPS location, the device's timezone is taken into account.

  • comms_status_code (string): Current communication status. Can be "online", "inactive", "offline", "never".

Request

Responses

OK