Get license status
# Get an Account's License Status ### `GET /licenses/{accountName}` Returns information about an account’s Software Management Services licenses and a list of licensed devices. **Note:** This request is only used with accounts that have a monthly recurring billing (MRC) subscription. Accounts with event-based billing do not need to track licenses. ## Uses and Requirements This API returns information for licenses applied to HTTP devices. ## HTTP Request GET [https://thingspace.verizon.com/api/fota/v2/licenses/{accountName}](/docs/premium-apis/software-management/software-management-v1/api-endpoints/software-management-subscriptions-v1/getaccountlicensestatus) ## Resource Path and Query Parameters You must include the account name in the path and the lastSeenDeviceId query parameter to specify the starting record. | Parameter Name | Data Type | Description | |:-----------------------|:-----------|:-----------------------------------------------------| | **accountName** <br> _required path_ | string | The name of the account for which you want the license status. An account name is usually numeric, and must include any leading zeros. | | **lastSeenDeviceId** <br> _required query_ | string | Only return devices with IMEIs larger than this value. Use 0 for the first request. If `hasMoreData=true` in the response, use the `lastSeenDeviceId` value from the response in the next request. | ## Header Parameters The request header must 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/session-management/guides/getting-started). | Parameter Name | Data Type | Description | |:-----------------------|:-----------|:-----------------------------------------------------------------------------| | **Authorization** <br> _required_ | string | HTTP Authorization bearer token: <br> `Authorization: Bearer {token}` | | **VZ-M2M-Token** <br> _required_ | string | A valid session token: <br> `VZ-M2M-Token: {M2Mtoken}` | ## Request Body None ## Example Request: Request a summary of FOTA license for the account. ``` json curl https://thingspace.verizon.com/api/fota/v2/licenses/0402196254-00001/index/0 -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN' ``` ## Success Response **Status 200** | Parameter | Data Type | Description | |:----------------------|:----------|:-----------------------------------------------------------------------------| | **accountName** | string | The name or number of the billing account. | | **totalLicense** | integer | The number of monthly licenses in the MRC subscription for HTTP device | | **assignedLicenses** | integer | The number of licenses assigned to HTTP devices. | | **hasMoreData** | boolean | True if there are more devices to retrieve. | | **lastSeenDeviceId** | string | If `hasMoreData=true`, the startIndex to use for the next request. 0 if `hasMoreData=false`. | | **maxPageSize** | integer | Maximum page size. | | **deviceList** | array of devices | IMEI device list. | | deviceList.**deviceId** | string | The Device IMEI. | | deviceList.**assignmentTime** | string | The date and time that a Software Management Services license was assigned to the device. | ## Example Success Response ``` json { "accountName":"0402196254-00001", "totalLicenses":5000, "assignedLicenses":4319, "hasMoreData": true, "lastSeenDeviceId": 1000, "deviceList":[ { "deviceId": "990003425730535", "assignmentTime": "2017-11-29 20:15:42.738 +0000 UTC" }, { "deviceId": "990000473475989", "assignmentTime": "2017-11-29 20:15:42.738 +0000 UTC" }, { "deviceId": "990000347475989", "assignmentTime": "2017-11-29 20:15:42.738 +0000 UTC" }, { "deviceId": "990007303425535", "assignmentTime": "01-01-1900 0:0:0 +0000 UTC" } ] } ``` ## Failure Response **Status 400** All error messages are returned in this format: ``` json { "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.