---
updatedAt: 2026-05-27T10:18:53.000Z
agentTools:
  projectIndex: https://gethapn.readme.io/llms.txt
---

# Get device status

Get the latest known status of a device.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "description": "The Hapn API is an HTTP interface for managing devices, accounts, and cloud data.",
    "version": "1.0.0",
    "title": "Hapn API",
    "termsOfService": "https://gethapn.com/terms",
    "contact": {
      "name": "Dev",
      "email": "developer@gethapn.com",
      "url": "http://gethapn.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "servers": [
    {
      "url": "https://api.iotgps.io/v1",
      "description": "Prod"
    },
    {
      "url": "https://api-dev.iotgps.io/v1",
      "description": "Dev"
    }
  ],
  "paths": {
    "/devices/{imei}/status": {
      "get": {
        "summary": "Get device status",
        "tags": [
          "Devices"
        ],
        "parameters": [
          {
            "name": "imei",
            "in": "path",
            "required": true,
            "description": "IMEI of the device",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Device status result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "$ref": "#/components/schemas/DeviceStatus"
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "success": true,
                      "message": "ok",
                      "result": {
                        "deviceTypeId": 12,
                        "gpsUTCTime": "20210906075238",
                        "gpsAccuracy": "0",
                        "batteryPercentage": "22",
                        "created": "2021-09-06T10:52:52Z",
                        "cellId": "0154C201",
                        "sendTime": "2021-09-06T10:52:49.000Z",
                        "messageId": "5f1a9c76-441b-40f6-9261-bae29282e68f",
                        "address": "310 Carmita Ave, Rutherford, NJ 07070",
                        "azimuth": "0",
                        "reportType": "0",
                        "clientId": 606609,
                        "imei": "868239050345326",
                        "longitude": "-74.117069",
                        "odoMileage": "409.1",
                        "speed": "0.0",
                        "latitude": "40.830864",
                        "appUrl": "https://app.gethapn.com/home?tab=trackers&type=tracker&imei=868239050345326",
                        "hoursOfOperation": "10.01"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/DeviceNotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "operationId": "get-device-status",
        "description": "Get the latest known status of a device."
      }
    }
  },
  "components": {
    "schemas": {
      "DeviceStatus": {
        "description": "Current status of the device",
        "type": "object",
        "properties": {
          "gpsAccuracy": {
            "type": "string"
          },
          "cellId": {
            "type": "string"
          },
          "messageId": {
            "type": "string"
          },
          "azimuth": {
            "type": "string"
          },
          "reportType": {
            "type": "string"
          },
          "odoMileage": {
            "type": "string"
          },
          "speed": {
            "type": "string"
          },
          "latitude": {
            "type": "string"
          },
          "reportId": {
            "type": "string"
          },
          "gpsUTCTime": {
            "type": "string"
          },
          "batteryPercentage": {
            "type": "string"
          },
          "created": {
            "type": "string"
          },
          "sendTime": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "clientId": {
            "type": "number"
          },
          "imei": {
            "type": "string"
          },
          "longitude": {
            "type": "string"
          },
          "appUrl": {
            "type": "string"
          },
          "hoursOfOperation": {
            "type": "string"
          }
        },
        "required": [
          "gpsUTCTime",
          "batteryPercentage",
          "created",
          "sendTime",
          "address",
          "azimuth",
          "clientId",
          "imei",
          "longitude",
          "speed",
          "latitude",
          "appUrl",
          "hoursOfOperation"
        ],
        "x-examples": {
          "example-1": {
            "gpsUTCTime": "20200402233528",
            "batteryPercentage": "82",
            "created": "2020-04-02T23:39:02Z",
            "sendTime": "2020-04-02T23:35:32.000Z",
            "address": "549 Vermont Street, Brooklyn, New York 11207",
            "azimuth": "0",
            "clientId": 431,
            "imei": "015181000672494",
            "longitude": "-73.892205",
            "tripTriggerCount": 2,
            "speed": "0.0",
            "latitude": "40.666222",
            "appUrl": "https://app.gethapn.com/home?tab=trackers&type=tracker&imei=015181000672494",
            "hoursOfOperation": "10.01",
            "value": {
              "gpsUTCTime": "20210906075238",
              "gpsAccuracy": "3",
              "batteryPercentage": "22",
              "created": "2021-09-06T07:52:52Z",
              "cellId": "0154C201",
              "sendTime": "2021-09-06T07:52:49.000Z",
              "messageId": "fe1a41d7-fe41-4861-95fb-c80a97259c3d",
              "address": "310 Carmita Ave, Rutherford, NJ 07070",
              "azimuth": "0",
              "reportType": "0",
              "clientId": 606609,
              "imei": "868239050345326",
              "longitude": "-74.117069",
              "odoMileage": "409.1",
              "speed": "0.0",
              "latitude": "40.830864",
              "appUrl": "https://app.gethapn.com/home?tab=trackers&type=tracker&imei=868239050345326",
              "hoursOfOperation": "10.01"
            }
          }
        },
        "title": "DeviceStatus"
      },
      "SuccessResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "result": {
            "type": "object"
          }
        },
        "required": [
          "message",
          "success"
        ],
        "x-examples": {
          "example-1": {
            "value": {
              "success": true,
              "message": "ok",
              "result": {
                "imei": "12345"
              }
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "x-examples": {
          "example-1": {
            "value": {
              "success": false,
              "message": "Unauthorized"
            }
          }
        }
      }
    },
    "responses": {
      "DeviceNotFound": {
        "description": "The specified resource was not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "example-1": {
                "value": {
                  "success": false,
                  "message": "Device Not Found"
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "example-1": {
                "value": {
                  "success": false,
                  "message": "Unauthorized"
                }
              }
            }
          }
        }
      },
      "Error": {
        "description": "Server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "example-1": {
                "value": {
                  "success": false,
                  "message": "Error"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://auth.usehapn.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Devices",
      "description": "Everything about your Devices"
    }
  ],
  "security": [
    {
      "OAuth2": []
    }
  ]
}
```