Skip to content

GPS Devices Data Providers Guide

GPS devices are essential for tracking location data in real-time. They provide accurate geolocation information that can be used in various applications, such as logistics, fleet management, and personal navigation.

This guide provides an overview of integrating GPS devices as data providers into your system.

API Fields

FieldTypeDescription
device.id requiredStringDevice IMEI
device.status requiredStringCommand status ENUM
device.gsm_signalNumberGSM RSSI Signal Value Description
device.gsm_signal_levelStringGSM RSSI Signal Level Description
device.gps_satellitesNumberTotal availability GPS satellites
vehicle.vin requiredStringVehicle VIN Description
vehicle.license_plateStringVehicle's License Plate
vehicle.engine_status requiredStringEngine status (ON/OFF)
vehicle.speed requiredNumberSpeed value in Km/h
vehicle.odometer requiredNumberVehicle odometer in Km
vehicle.battery.system requiredNumberVehicle battery voltage
vehicle.battery.deviceNumberDevice battery voltage
vehicle.battery.device_percentageNumberDevice battery percentage
vehicle.location.elevationNumberVehicle elevation in meters
vehicle.location.headingNumberVehicle heading in degrees
vehicle.location.location requiredArray[longitude, latitude]
vehicle.behaviorStringOne of available behaviours
received_atStringDate of the event received by the platform in UTC ISO
created_at requiredStringDate of the event in UTC ISO

What is the VIN?

The VIN - Vehicle Identification Number (or NIV - Número de Identificação do Veículo), is the universal registration system for automotive vehicles that are produced.

GSM RSSI Level
RSSI LevelSignal strengthDescription
EXCELENTExcelentStrong signal with minimal interferences excelent data speeds
GOODGoodStrong signal with good data speeds
FAIRFairFair but useful, fast and reliable data speeds may be attained, but marginal data with drop-outs is possible
POORPoorPerformance will drop drastically
NO_SIGNALNo signalDisconnection

These enums are used to determine the signal strength of the device. The values are based on the RSSI (Received Signal Strength Indicator) value, which is a measure of the power level that a device receives from a cellular tower.

RSSISignal strengthDescription
> -70 dBmExcelentStrong signal with minimal interferences excelent data speeds
-70 dBm to -85 dBmGoodStrong signal with good data speeds
-86 dBm to -100 dBmFairFair but useful, fast and reliable data speeds may be attained, but marginal data with drop-outs is possible
< -100 dBmPoorPerformance will drop drastically
-110 dBmNo signalDisconnection
Vehicle Status
StatusDescription
LOCKEDVehicle is locked
OPERATIONALVehicle is unlocked and working well
SETUPDevice not installed
SOFT_LOCK_RECEIVEDSoft lock command received by the device
SOFT_LOCK_APPLYINGApplying to device soft lock command
SOFT_LOCK_CONFIRMEDDevice soft lock command finished
HARD_LOCK_RECEIVEDHard lock command received by the device
HARD_LOCK_APPLYINGApplying to device hard lock command
HARD_LOCK_CONFIRMEDDevice hard lock command finished
UNLOCK_RECEIVEDUnlock command received by the device
UNLOCK_APPLYINGApplying to device unlock command
UNLOCK_CONFIRMEDDevice unlock command finished
Vehicle Behavior
StatusDescription
DEVICE_POWER_ONPower return to the device
DEVICE_VOIDEDDevice voided, light sensor activated or device moved detected
DEVICE_VIOLATED_ENERGYDevice voided, voltage readings of vehicle battery or device battery tempered
ENGINE_ONIgnition on
ENGINE_OFFIgnition off
SOFT_ACCELERATIONLight Acceleration
HARD_ACCELERATIONSharp Acceleration
SOFT_BREAKLight braking
HARD_BREAKHard braking
SOFT_TURNLight turn
HARD_TURNHard turn
TOKEN_EXPIREDExpired driver token
TRIP_STARTBeginning of route
TRIP_ENDEnd of route

Payload Example

json
{
  "device": {
    "id": "AABBBBBBCCCCCCD",
    "status": "OPERATIONAL",
    "gsm_signal": -72,
    "gps_satellites": 8
  },
  "vehicle": {
    "vin": "4Y1SL65848Z411430",
    "license_plate": "ZRV2A23",
    "behavior": "ENGINE_ON",
    "engine_status": "ON",
    "speed": 12,
    "odometer": 124,
    "battery": {
      "system": 12.707,
      "device": 4.166,
      "device_percentage": 100
    },
    "location": {
      "elevation": 143,
      "heading": 24,
      "location": [-27.607124, -48.5752832]
    }
  },
  "received_at": "2023-01-02T12:23:02Z",
  "created_at": "2023-01-02T12:23:02Z"
}

Important information about dates

The dates in the payload are in UTC ISO format. The date format is YYYY-MM-DDTHH:mm:ssZ, where T separates the date and time, and Z indicates that the time is in UTC.

Responses for successful requests

Status code: 202

json
{
  "status": "success",
  "stage": "prod"
}

Responses for non successful requests

Status code: 400

eg.

json
{
  "contract": "gps",
  "validations": [
    {
      "instancePath": "/vehicle",
      "schemaPath": "#/properties/vehicle/required",
      "keyword": "required",
      "params": {
        "missingProperty": "X"
      },
      "message": "deve ter a propriedade obrigatória X"
    }
  ]
}