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

# Get list of devices

Gets a list of all the devices in the account.

# 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": {
      "get": {
        "summary": "Get list of devices",
        "tags": [
          "Devices"
        ],
        "responses": {
          "200": {
            "description": "Device list result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedSuccessResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "object",
                          "required": [
                            "items"
                          ],
                          "properties": {
                            "items": {
                              "type": "array",
                              "uniqueItems": true,
                              "minItems": 1,
                              "items": {
                                "$ref": "#/components/schemas/Device"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "success": true,
                      "message": "ok",
                      "result": {
                        "items": [
                          {
                            "imei": "862785041422448",
                            "clientId": 128,
                            "created": "2020-06-02T20:48:24.494Z",
                            "modified": "2021-06-10T11:13:59.864Z",
                            "name": "Van #2",
                            "status": "A",
                            "iccid": "8944500204198462404",
                            "deviceId": 62789,
                            "color": "#579db5",
                            "icon": "location-arrow",
                            "description": "Delivery Van #2",
                            "model": {
                              "name": "GV500MA",
                              "description": "OBD GPS Tracker for Vehicles",
                              "pictureUrl": "https://cdn.gethapn.com/img/gv500.png"
                            },
                            "connectivityProvider": "POD",
                            "appUrl": "https://app.gethapn.com/home?tab=trackers&type=tracker&imei=862785041422448",
                            "assetProfile": {
                              "name": "Asset 1",
                              "make": "Make 1",
                              "model": "Model 1",
                              "serialNumber": "1234567890",
                              "year": 2021,
                              "type": {
                                "id": 1,
                                "name": "Asset Type 1",
                                "category": {
                                  "id": 1,
                                  "name": "Vehicle"
                                }
                              },
                              "status": "Active",
                              "assetStatus": {
                                "status": "Active",
                                "label": "Active",
                                "description": "Assets that are currently in operation and available for use",
                                "color": "#0BD272"
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "operationId": "get-devices",
        "description": "Gets a list of all the devices in the account.",
        "parameters": []
      }
    }
  },
  "components": {
    "schemas": {
      "Device": {
        "description": "A GPS Tracking device",
        "type": "object",
        "x-examples": {
          "example-1": {
            "imei": "015181000672494",
            "clientId": 431,
            "created": "2020-02-25T18:09:02.923Z",
            "name": "Keya's RV",
            "status": "D",
            "iccid": "8944500204198459301",
            "modified": "2021-03-08T13:35:48.194Z",
            "createdBy": null,
            "modifiedBy": null,
            "deviceId": 29838,
            "color": "#df4caa",
            "icon": "baby-carriage",
            "description": "Keya's GPS",
            "model": {
              "name": "GV500MA",
              "description": "OBD GPS Tracker for Vehicles",
              "pictureUrl": "https://cdn.gethapn.com/img/gv500.png"
            },
            "connectivityProvider": "POD",
            "appUrl": "https://app.gethapn.com/home?tab=trackers&type=tracker&imei=015181000672494",
            "assetProfile": {
              "name": "Asset 1",
              "make": "Make 1",
              "model": "Model 1",
              "serialNumber": "1234567890",
              "year": 2021,
              "type": {
                "id": 1,
                "name": "Asset Type 1",
                "category": {
                  "id": 1,
                  "name": "Vehicle"
                }
              },
              "status": "Active",
              "assetStatus": {
                "status": "Active",
                "label": "Active",
                "description": "Assets that are currently in operation and available for use",
                "color": "#0BD272"
              }
            },
            "value": {
              "imei": "868239050345326",
              "clientId": 606609,
              "created": "2021-08-18T01:25:05.126Z",
              "name": "RR1",
              "status": "A",
              "iccid": "89148000006003980180",
              "modified": null,
              "createdBy": null,
              "modifiedBy": null,
              "deviceId": 827763,
              "color": "green",
              "icon": "location-arrow",
              "description": "Keya's GPS",
              "model": {
                "name": "GV500MA",
                "description": "OBD GPS Tracker for Vehicles",
                "pictureUrl": "https://cdn.gethapn.com/img/gv500.png"
              },
              "connectivityProvider": "POD",
              "appUrl": "https://app.gethapn.com/home?tab=trackers&type=tracker&imei=868239050345326"
            }
          }
        },
        "title": "Device",
        "properties": {
          "imei": {
            "type": "string",
            "minLength": 15
          },
          "clientId": {
            "type": "number"
          },
          "created": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "iccid": {
            "type": "string"
          },
          "modified": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "modifiedBy": {
            "type": "string",
            "nullable": true
          },
          "deviceId": {
            "type": "number"
          },
          "color": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "model": {
            "type": "object",
            "required": [
              "name",
              "description",
              "pictureUrl"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "pictureUrl": {
                "type": "string"
              }
            }
          },
          "connectivityProvider": {
            "type": "string"
          },
          "appUrl": {
            "type": "string"
          },
          "assetProfile": {
            "$ref": "#/components/schemas/AssetProfile",
            "description": "The asset profile associated with the device, if any.",
            "example": {
              "name": "Asset 1",
              "make": "Make 1",
              "model": "Model 1",
              "serialNumber": "1234567890",
              "year": 2021,
              "type": {
                "id": 1,
                "name": "Asset Type 1",
                "category": {
                  "id": 1,
                  "name": "Vehicle"
                }
              },
              "status": "Active",
              "assetStatus": {
                "status": "Active",
                "label": "Active",
                "description": "Assets that are currently in operation and available for use",
                "color": "#0BD272"
              }
            }
          }
        },
        "required": [
          "imei",
          "clientId",
          "created",
          "name",
          "status",
          "iccid",
          "modified",
          "deviceId",
          "color",
          "icon",
          "description",
          "model",
          "connectivityProvider",
          "appUrl"
        ]
      },
      "PaginatedSuccessResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array"
              },
              "nextToken": {
                "type": "string"
              }
            },
            "required": [
              "items"
            ]
          }
        },
        "required": [
          "message",
          "success",
          "result"
        ],
        "x-examples": {
          "example-1": {
            "value": {
              "success": true,
              "message": "string",
              "result": {
                "items": [
                  {
                    "imei": "12345"
                  }
                ],
                "nextToken": "eyJzZW5kVGltZSI6IjIwMjEtMDgtMThUMTU6MTc6NTAuMDAwWiIsImNsaWVudElkIjo2MDY2MDksIm1lc3NhZ2VfaWQiOiI2ZTMwYzczMS1iMGNhLTQwMzgtYjY1Zi1kM2Y1NGZlMWQ0ZjUifQ=="
              }
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "x-examples": {
          "example-1": {
            "value": {
              "success": false,
              "message": "Unauthorized"
            }
          }
        }
      },
      "AssetProfileType": {
        "title": "Asset profile type",
        "description": "An asset profile type",
        "type": "object",
        "x-examples": {
          "example-1": {
            "id": 1,
            "name": "Car",
            "category": {
              "id": 1,
              "name": "Vehicle"
            }
          }
        },
        "properties": {
          "id": {
            "type": "number",
            "description": "The asset profile type identifier"
          },
          "name": {
            "type": "string",
            "description": "The asset profile type name"
          },
          "category": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The asset profile category identifier"
              },
              "name": {
                "type": "string",
                "description": "The asset profile category name"
              }
            }
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "AssetProfile": {
        "title": "Asset profile",
        "description": "An asset profile",
        "type": "object",
        "x-examples": {
          "example-1": {
            "name": "Asset 1",
            "make": "Make 1",
            "model": "Model 1",
            "serialNumber": "1234567890",
            "year": 2021,
            "type": {
              "id": 1,
              "name": "Car",
              "category": {
                "id": 1,
                "name": "Vehicle"
              }
            },
            "status": "Active"
          }
        },
        "properties": {
          "name": {
            "type": "string",
            "description": "The asset profile name"
          },
          "make": {
            "type": "string",
            "description": "The asset profile make"
          },
          "model": {
            "type": "string",
            "description": "The asset profile model"
          },
          "serialNumber": {
            "type": "string",
            "description": "The asset profile serial number"
          },
          "year": {
            "type": "number",
            "description": "The asset profile year"
          },
          "type": {
            "$ref": "#/components/schemas/AssetProfileType"
          },
          "status": {
            "type": "string",
            "description": "The asset profile status. This value correspond to the status field of one of the custom status objects."
          },
          "assetStatus": {
            "$ref": "#/components/schemas/AssetProfileCustomStatus",
            "description": "The asset profile status. This is one of the custom status objects defined in the system.",
            "example": {
              "status": "Active",
              "label": "Active",
              "description": "Assets that are currently in operation and available for use",
              "color": "#0BD272"
            }
          }
        },
        "required": [
          "name",
          "type",
          "status"
        ]
      },
      "AssetProfileCustomStatus": {
        "title": "Asset profile custom status",
        "description": "An asset profile custom status",
        "type": "object",
        "x-examples": {
          "example-1": {
            "status": "Active",
            "label": "Active",
            "description": "Assets that are currently in operation and available for use",
            "color": "#0BD272"
          }
        },
        "properties": {
          "status": {
            "type": "string",
            "description": "The asset profile custom status"
          },
          "label": {
            "type": "string",
            "description": "The asset profile custom status label"
          },
          "description": {
            "type": "string",
            "description": "The asset profile custom status description"
          },
          "color": {
            "type": "string",
            "description": "The asset profile custom status color"
          }
        },
        "required": [
          "status",
          "label",
          "description",
          "color"
        ]
      }
    },
    "responses": {
      "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": []
    }
  ]
}
```