Get the subscription status
# Retrieve an account’s subscription status #### `GET /subscriptions/{account}` Returns information about an account’s Software Management Services subscription status. ## Request Components #### HTTP Request `GET https://thingspace.verizon.com/api/fota/v1/subscriptions/{account}` ## Resource Path and Query Parameters You must include the account name in the path. | Parameter Name | Data Type | Description | |-----|-----|-----| | **account** *(required)* | string | The name of the account for which you want the Software Management Services subscription status. An account name is usually numeric, and must include any leading zeros.| ## 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/session-management/guides/getting-started). | Parameter Name | Data Type | Description | |-----|-----|-----| | **Authorization** *(required)* | string | HTTP Authorization bearer token: `Authorization: Bearer {token}` | | **VZ-M2M-Token** *(required)* | string | A valid session token: `VZ-M2M-Token: {M2Mtoken}` | | **Content-Type** *(required)* | string | Must be application/json `Content-Type: application/json` | ## Request Body None. ## Example Request Request the subscription status for an account: `curl https://thingspace.verizon.com/api/fota/v1/subscriptions/$ACCOUNT -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN'` ## Success Responses **Status 200** A success response includes the type of Software Management Services subscription, the number of total licenses (if applicable), and the registered callback endpoint. | Parameter Name | Data Type | Description | |-----|-----|-----| | **accountName** | string | The name (number) of the billing account. | | **purchaseType** | string | Comma-separated list of [subscription models](https://thingspace.verizon.com/documentation/api-documentation.html#/http/software-management/guides/getti[…]tware-management-services-subscriptions) used by the account: `TS-HFOTA-MRC` - a monthly recurring contract for a fixed number of licenses; `TS-HFOTA-EVNT` - a post-pay plan in which the account is billed for the number of licenses used in each month (the number of events); both of the above | | **licenseCount** | integer | The number of monthly licenses in an MRC subscription. This will be zero for accounts that only have Event subscriptions. | | **licenseUsedCount** | integer | The number of licenses currently assigned to devices. | | **updateTime** | string | The date and time of when the subscription was last updated. | ## Example Success Response ```json { "accountName":"0402196254-00001", "purchaseType": "TS-HFOTA-EVNT,TS-HFOTA-MRC", "licenseCount": 9000, "licenseUsedCount": 1000, "updateTime": "2018-03-02 19:50:06.534 +0000 UTC" } ``` ## Failure Responses **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](https://thingspace.verizon.com/documentation/api-documentation.html#/http/software-management/guides/error-messages) page, along with explanations and suggestions for corrective actions.