Standard APIsReady SIMAPI EndpointsPromotion Period InformationRetrieve Aggregate Usage

API Reference

Retrieve Device Aggregate Usage

POST /v1/devices/usage/actions/promoaggregateusage

Retrives the aggregate data usage for all the MDNless devices during the promotional period.

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.

Parameter NameData TypeDescription
Authorization (required)stringHTTP Authorization bearer token: Authorization: Bearer {token}
VZ-M2M-Token (required)stringA valid session token: VZ-M2M-Token: {M2Mtoken}
Content-Type (required)stringMust be application/json Content-Type: application/json

HTTP Request

POST https://thingspace.verizon.com/api/m2m/v1/devices/usage/actions/promoaggregateusage

Request Parameters

Parameter NameData TypeDescription
accountName (required)stringThe name of a billing account. An account name is usually numeric and must include any leading zeros.
deviceId (required)arrayan array of the kind of device identifier and what the value of that identifier is.
deviceId.kindstringThe type of device identifier. This will be the identifier of the SIM card or ICCID (Integrated Circuit Card ID)
deviceId.valuestringThe 20-digit ICCID.
startTimestring (date-time)The starting time of the query period.
endTimestring(date-time)The ending time of the query period.

Request Body

The request body identifies the account that Anomaly Detection willl be activated for and sets initial maximums for abnormal and very abnormal and if abnormal, very abnormal or both will be monitored.

Example Request Body:

{
    "accountName": "0000123456-00001",
    "deviceIds": [
        {
            "kind": "iccid",
            "id": "20-digit ICCID"
        }
    ],
    "startTime": "2021-08-15T00:00:00Z",
    "endTime": "2021-08-16T00:00:00Z"
}

Success Responses

A successful request will return a request ID to identify the request in a callback. To learn more about callbacks, please visit About Callback Services.

Status 200

Example Success Response:

{
    "requestId": "595f5c44-c31c-4552-8670-020a1545a84d",
}

Failure Responses

Status 400

All failure responses are in this format:

{
    "errorCode": "error code string",
    "errorMessage": "error message string"
}

Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.

Callback Response

To learn more about callbacks, please visit About Callback Services. There will be two callbacks received:

Example callback with a comment stating "request completed processing":

{
    "username": "null",
    "password": "null",
    "requestId": "595f5c44-c31c-4552-8670-020a1545a84d",
    "deviceResponse": {},
    "comment": "Request Completed Processing",
    "callbackCount": 1,
    "maxCallbackThreshold": 4
}

Example callback with usage data:

{
    "username": "null",
    "password": "null",
    "requestId": "595f5c44-c31c-4552-8670-020a1545a84d",
    "deviceResponse": {
        "devicePromoUsageResponse": [
            {
                "deviceIdentifierCollection": [
                    {
                        "id": "20-digit ICCID",
                        "kind": "ICCID"
                    }
                ],
                "dataUsage": "3072",
                "smsUsage": "0",
                "moSms": "0",
                "mtSms": "0",
                "startDate": "2021-08-15T00:00:00.0000000",
                "endDate": "2021-08-16T00:00:00.0000000"
            }
        ]
    },
    "callbackCount": 1,
    "maxCallbackThreshold": 4
}

On this page