Get Rated Usage
# Get Rated Usage ### `POST /api/m2m/v1/devices/usage/actions/ratedusage` Use this endpoint to retrieve rated (billable) usage for Automotive OEM. ## 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`. | ## HTTP Request ### `POST https://thingspace.verizon.com/api/m2m/v1/devices/usage/actions/ratedusage` ## Request Parameters |Parameter Name|Data Type|Description| |-----|-----|-----| | **deviceId** *(required)* | 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 Directory Number, or MDN. For supported device Id and Kind please refer to the [Retrieve Device Information API](). | ## Request Body Example Request ```json { "deviceId":{ "id":"10-digit phone number", "kind":"mdn" } } ``` ## Success Responses Status 200 ```json { "deviceInformation":{ "billingEndDate":"2024-08-29T00:00:00.000", "billingResetDate":"2024-08-29T00:00:00.000", "billingStartDate":"2024-08-01T00:00:00.000", "dataUsage":1.0990909989, "mdn":10-digit phone number, "unit":"GB" } } ``` ## Success 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** | number (double precision) | The measured amount of data used in decimal format. | | **mdn** | integer (long) | The phone number (Mobile Directory 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 or **GB** for Gigabytes. | ## Failure Responses All error messages are returned in this format: ```json { "errorCode": "error code string", "errorMessage": "error message string" } ```