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

# Fleet snapshot, using OAuth2.

Gets the fleet snapshot of the latest available telematics data.
Response is limited to a maximum of 100 records per page.
Authentication is done using OAuth2.


# 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": {
    "/aemp/v2/Fleet/{pageNumber}": {
      "get": {
        "summary": "Fleet snapshot, using OAuth2.",
        "tags": [
          "AEMP"
        ],
        "parameters": [
          {
            "name": "pageNumber",
            "in": "path",
            "required": true,
            "description": "Requested page number. First request must use \"1\" as page number. \nNext available page number can be derived from the \"Links\"-section of the response.\n",
            "example": 1,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "includeAssetProfile",
            "in": "query",
            "required": false,
            "description": "Include asset profile details when available.",
            "example": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fleet"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Fleet"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/DeviceNotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "operationId": "get-aemp-fleet-v2",
        "description": "Gets the fleet snapshot of the latest available telematics data.\nResponse is limited to a maximum of 100 records per page.\nAuthentication is done using OAuth2.\n"
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "x-examples": {
          "example-1": {
            "value": {
              "success": false,
              "message": "Unauthorized"
            }
          }
        }
      },
      "Equipment": {
        "required": [
          "EquipmentHeader"
        ],
        "type": "object",
        "properties": {
          "EquipmentHeader": {
            "$ref": "#/components/schemas/EquipmentHeader"
          },
          "Location": {
            "$ref": "#/components/schemas/Location"
          },
          "CumulativeOperatingHours": {
            "$ref": "#/components/schemas/CumulativeOperatingHours"
          },
          "Distance": {
            "$ref": "#/components/schemas/Distance"
          },
          "assetProfile": {
            "$ref": "#/components/schemas/AempAssetProfile",
            "description": "The asset profile associated with the equipment when includeAssetProfile is true."
          }
        },
        "example": {
          "EquipmentHeader": {
            "EquipmentID": "862785041422448",
            "SerialNumber": "SN-1234",
            "PIN": "862785041422448"
          },
          "Location": {
            "datetime": "2026-01-01T12:00:00Z",
            "Latitude": 25.7617,
            "Longitude": -80.1918
          },
          "CumulativeOperatingHours": {
            "datetime": "2026-01-01T12:00:00Z",
            "Hour": 102.5
          },
          "Distance": {
            "datetime": "2026-01-01T12:00:00Z",
            "OdometerUnits": "kilometre",
            "Odometer": 3456.7
          },
          "assetProfile": {
            "name": "Loader 12",
            "make": "CAT",
            "model": "D200",
            "serialNumber": "1234",
            "type": {
              "id": 8,
              "name": "Loader",
              "category": {
                "id": 2,
                "name": "Equipment & Heavy Machinery"
              }
            },
            "imei": "862785041422448",
            "status": "custom_1763021990021_0.ugopxxvbgkf",
            "assetStatus": {
              "status": "custom_1763021990021_0.ugopxxvbgkf",
              "label": "custom_1763021990021_0.ugopxxvbgkf"
            }
          }
        }
      },
      "EquipmentHeader": {
        "type": "object",
        "properties": {
          "EquipmentID": {
            "type": "string"
          },
          "SerialNumber": {
            "type": "string"
          },
          "PIN": {
            "type": "string"
          }
        }
      },
      "Location": {
        "type": "object",
        "required": [
          "Latitude",
          "Longitude"
        ],
        "properties": {
          "datetime": {
            "title": "datetime",
            "type": "string",
            "format": "date-time",
            "xml": {
              "attribute": true
            }
          },
          "Latitude": {
            "maximum": 90,
            "minimum": -90,
            "type": "number"
          },
          "Longitude": {
            "maximum": 90,
            "minimum": -90,
            "type": "number"
          }
        }
      },
      "CumulativeOperatingHours": {
        "type": "object",
        "required": [
          "Hour"
        ],
        "properties": {
          "datetime": {
            "title": "datetime",
            "type": "string",
            "format": "date-time",
            "xml": {
              "attribute": true
            }
          },
          "Hour": {
            "type": "number"
          }
        }
      },
      "Distance": {
        "type": "object",
        "required": [
          "OdometerUnits",
          "Odometer"
        ],
        "properties": {
          "datetime": {
            "title": "datetime",
            "type": "string",
            "format": "date-time",
            "xml": {
              "attribute": true
            }
          },
          "OdometerUnits": {
            "type": "string",
            "enum": [
              "kilometre"
            ]
          },
          "Odometer": {
            "type": "number"
          }
        }
      },
      "AempAssetProfile": {
        "title": "AEMP asset profile",
        "description": "Optional asset profile information returned for AEMP fleet equipment when includeAssetProfile is enabled.",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "make": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": true
          },
          "serialNumber": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AempAssetProfileType"
              }
            ],
            "nullable": true
          },
          "imei": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "assetStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AempAssetProfileCustomStatus"
              }
            ],
            "nullable": true
          }
        }
      },
      "AempAssetProfileType": {
        "title": "AEMP asset profile type",
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AempAssetProfileCategory"
              }
            ],
            "nullable": true
          }
        }
      },
      "AempAssetProfileCategory": {
        "title": "AEMP asset profile category",
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "AempAssetProfileCustomStatus": {
        "title": "AEMP asset profile custom status",
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "FleetLinks": {
        "title": "Links",
        "type": "array",
        "items": {
          "title": "Links",
          "required": [
            "href",
            "rel"
          ],
          "type": "object",
          "properties": {
            "rel": {
              "title": "rel",
              "type": "string",
              "description": "The reference attribute describes the link. Paginated services\nshall include a collection of links that describe the current page (self),\nnext page (next), previous page (prev), and last page (last).\n"
            },
            "href": {
              "title": "href",
              "type": "string",
              "description": "The hypermedia reference URL (href) is a reference to another\nendpoint. These references are provided so that available data is discoverable\nby automated systems. The reference is an absolute URL.\n"
            }
          }
        },
        "description": "Each endpoint that returns more than one piece of equipment or\nmessage shall include a set of links. These links are used to describe the\nmetadata about the web service call. Each link shall contain a relationship\n(rel) and a hyperlink (href).\n"
      },
      "Fleet": {
        "required": [
          "Equipment",
          "Links",
          "version"
        ],
        "type": "object",
        "properties": {
          "Links": {
            "$ref": "#/components/schemas/FleetLinks"
          },
          "Equipment": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Equipment"
            }
          },
          "version": {
            "title": "version",
            "type": "integer",
            "format": "int64",
            "xml": {
              "attribute": true
            }
          },
          "snapshotTime": {
            "title": "snapshotTime",
            "type": "string",
            "format": "date-time",
            "xml": {
              "attribute": true
            }
          }
        },
        "xml": {
          "name": "Fleet",
          "namespace": "http://standards.iso.org/iso/15143/-3"
        }
      }
    },
    "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": "AEMP",
      "description": "Association of Equipment Management Professionals standard"
    }
  ],
  "security": [
    {
      "OAuth2": []
    }
  ]
}
```