Get Rated Usage

POST /api/m2m/v1/devices/usage/actions/ratedusage

Use this endpoint to retrieve rated usage for Auto OEM.

Request Components

HTTP Request

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

Resource Path and Query Parameters

None.

Header Parameters

The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token, and must set the content-type to JSON.

Parameter Name Data Type Description
Authorization
required
string HTTP Authorization bearer token.
VZ-M2M-Token
required
string A valid session token returned by POST /session/login.
Content-Type
required
string Must be application/json.

Request Body

Request Parameters

Parameter Name Data Type Description
deviceId
object An object containing device ID information.
     id
required
string The ID of a device.
     kind
required
string The type of device ID. The example is Mobile Device Number, or MDN..

For supported device Id and Kind please refer to the Retrieve Device Information API endpoint.

Example Request

{
 
   "deviceId":{
 
      "id":"10-digit phone number",
 
      "kind":"mdn"
 
   }
 
}

Success Responses

Status 200

{
   "deviceInformation":{
      "billingEndDate":"2014-04-05T00:00:00.000",
      "billingResetDate":"2014-04-06T00:00:00.000",
      "billingStartDate":"2014-04-07T00:00:00.000",
      "dataUsage":1.0990909989,
      "mdn":10-digit phone number,
      "unit":"GB"
   }
}

Response Parameters

Parameter Name Data Type Description
deviceInformation object An object containing the details for rated usage.
     billingEndDate string ($datetime) The defined end of the billing period.
     billingResetDate
string ($datetime) The date when data usage measurement restarted for the next billing period.
     billingStartDate string ($datetime) The defined start of the billing period.
     dataUsage double The measured amount of data used in decimal format.
     mdn integer (long) The phone number of the device being queried for usage.
     unit string

The units defining the measured amount of data used. Valid values include:

  • KB for Kilobytes
  • MB for Megabytes
  • GB for Gigabytes

Failure Responses

Status 400

All error messages are returned in this format:

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