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).

Contents

See also:

Request components

A vz-m2m-token is required to use these APIs. To obtain a token, please visit Getting Started to get a token.

HTTP Request

POST https://thingspace.verizon.com/api/hyper-precise/v1/report/aggregate

Request Parameters

Parameter Data Type Description
accountNumber
required
string The unique identifier for the account.
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 Number of devices returning usage info. Could be 0, 1 or more. If 0 the query will return all devices belonging to customer.
deviceGroup string User defined group name the devices are a member of.
dataPlan string The data plan the devices beign queried belong to.
noSessionFlag string Filters on devices which return only "no sessions".

Request Body

Example request:

curl -X 'POST' \
  'https://thingspace.verizon.com/api/hyper-precise/v1/report/aggregate' \
  -H 'accept: application/json' \
  -H 'VZ-M2M-Token: {token}' \
  -H 'accountNumber: {accountNumber}' \
  -H 'imei: 0' \
  -H 'Content-Type: application/json' \
  -d '{
  "accountNumber": "string",
  "startDate": "string",
  "endDate": "string",
  "imei": "string",
  "deviceGroup": "string",
  "dataPlan": "string",
  "noSessionFlag": "string"
}'

Success Response

Status 200

A successful response shows session and usage details for up to 10 devices.

Example response:

{
  "txid": "string",
  "usage": [
    {
      "imei": "string",
      "numberOfSessions": 0,
      "bytesTransferred": 0
    }
  ],
  "errors": [
    {
      "imei": "string",
      "errorMessage": "string",
      "errorResponse": {
        "errorCode": "INVALID_ACCESS",
        "errorMessage": "string",
        "httpStatusCode": "100 CONTINUE",
        "detailErrorMessage": "string"
      }
    }
  ]
}

Response Parameters

Parameter Data Type Description
txid string Transaction ID. The unique ID of the report request
usage string An object conatining the imei, number of sessions and data transferred in Bytes.
imei string International Mobile Equipment Idnetifier. 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 Idnetifier. This is the ID of the device reporting errors.
errorMessage string A general error message.
errorResponse array An array of the following parameters
errorCode string The error code sent to the device.
errorMessage string Details and additional information about the error code.
httpStatusCode string HTML error code and description.
detailErrorMessage string More detail and information about the HTML error code.

Failure Responses

Code and Meaning Format
400 - Bad Request.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Device Not Found, Request will be queued"
}
401 - Unauthorized request. Access token is missing or invalid.
{
  "errorCode": "INVALID_ACCESS",
  "errorMessage": "The access policy denied the resource operation for this user"
}
403 - Forbidden request.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Device Not Certified"
}
404 - Bad request. Not found.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Device inactive"
}
409 - Bad request. Conflict state.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Service Not Purchased"
}

500 - Internal Server Error.

{
  "errorCode": "INTERNAL_ERROR",
  "errorMessage": "Device is active in several accounts"
}