API Reference
# Get Aggregated Usage Report (Synchronous) ## `POST /report/aggregate` Calculate aggregated report by day with number of sessions and usage information. User will receive a synchronous response for a specified list of devices (max 10) and date range (max 180 days). ## HTTP Request [POST https://thingspace.verizon.com/api/hyper-precise/v1/report/aggregate](/docs/specialized-apis/hyper-precise-location/api-endpoints/device-reports-for-hyper-precise-feature-usage/aggregate-usage-report-synchronous/calculateaggregatedreportsynchronous) ## Header Parameters The request header must set the content-type to JSON, contain a current ThingSpace authorization token and a current VZ-M2M session token. For more details on how to get these tokens, visit [Getting Started](https://thingspace.verizon.com/documentation/api-documentation.html#/http/connectivity-management/guides/getting-started/introduction-to-the-connectivity-management-api). |Parameter Name|Data Type|Description| |------------|------------|------------| | **Authorization** *(required)* | string | HTTP Authorization request header containing a valid Bearer token: `Authorization: Bearer {token}` | | **VZ-M2M-Token** *(required)* | string | A valid session token returned by a Connectivity Management `POST /session/login` request. | | **Content-Type** *(required)* | string | Must be `application/json`. | ## Request Parameters |Parameter Name|Data Type|Description| |------------|------------|------------| | **accountNumber** *(required)* |string | The numeric name of the account, including leading zeros. | | **startDate** | string | Start date of session to include. If not specified information will be shown from the earliest available (180 days). ISO 8601 format.| | **endDate** |string| End date of session to include. If not specified information will be shown to the latest available. ISO 8601 format.| | **imei** *(required)* | string | ID number of devices queried for usage info. Could be `0`, `1 ID` or more (up to 10). If `0` the query will return all devices belonging to customer. | | **deviceGroup** | string | Optional filter — only include devices matching this user-assigned device group name. | | **dataPlan** | string | Optional filter — only include devices matching this carrier rate plan code. | | **noSessionFlag** | boolean | Optional filter — when "true", returns only devices with no sessions.| ## Request Body Example request: ```json { "accountNumber": "0000123456-00001", "startDate": "2022-12-09T22:01:06.217Z", "endDate": "2022-12-09T22:01:08.734Z", "imei": [ "15-digit IMEI" ], "deviceGroup": "string", "dataPlan": "string", "noSessionFlag": false } ``` ## Success Response **Status 200** A successful response shows session and usage details for up to 10 devices and a txid. Example response: ```json { "txid": "60c07fff-eeee-ffff-gggg-75e6a7c238f6", "usage": [ { "imei": "15-digit IMEI", "numberOfSessions": 0, "bytesTransferred": 0 } ], "errors": [ { "imei": "15-digit IMEI", "errorMessage": "string", "errorResponse": "string" } ] } ``` ## Response Parameters |Parameter Name|Data Type|Description| |------------|------------|------------| | **txid** | string| Transaction ID. The unique ID (UUID) of the report request. | | **usage** | object | An object conatining the imei, number of sessions and data transferred in Bytes.| | **imei** | string| International Mobile Equipment Identifier. This is the ID of the device reporting usage.| | **numberOfSessions** |integer| Number of sessions established by the device reporting usage.| | **bytesTransferred** | integer| The amount of data transferred by the device reporting usage, maesured in Bytes.| | **errors** |string| An object containing any errors reported by the device, using the following parameters: | **imei** |string | International Mobile Equipment Identifier. This is the ID of the device reporting usage.| | **errors** | object | An object containing device IDs and errors associate with reporting from these devices. | | **imei** | string| International Mobile Equipment Identifier. This is the ID of the device reporting errors.| | **errorMessage** | string| A general error message. | | **errorResponse** | array | An array of the following parameters: | ## Failure Responses Request failures will be in this format: ```json { "errorCode": "INVALID_PARAMETER", "errorMessage": "Device Not Found, Request will be queued" } ```