Get Aggregated Usage Report (Asynchronous)

Get Aggregated Usage Report (Asynchronous)

POST /report/async/aggregate

Calculate an aggregated report by day with number of sessions and usage information. User will receive an asynchronous callback for the specified list of devices (Max 10000) 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/async/aggregate

Request Parameters

Parameter Data Type Description
X-Portal-Initiated
required
string A flag for using a listener. Set to true or false. 
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/async/aggregate' \
  -H 'accept: application/json' \
  -H 'VZ-M2M-Token: 35246' \
  -H 'X-Portal-Initiated: true' \
  -H 'accountNumber: 1654' \
  -H 'imei: 0' \
  -H 'Content-Type: application/json' \
  -d '{
  "accountNumber": "string",
  "startDate": "string",
  "endDate": "string",
  "imei": "string",
  "deviceGroup": "string",
  "dataPlan": "string",
  "noSessionFlag": "string"
}'

Success Responses

Status 200

A successful request returns a Transaction ID (txid) and the status of "Queued".

Example response:

{
  "txid": "string",
  "status": "QUEUED"
}

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"
}