Get Subscription Status
# Get Location Services Subscription Status ### `GET /subscriptions/{accountName}` Returns the current status of an account’s Device Location Service subscription. There are two types of subscriptions: - **A monthly recurring subscription**, in which the account purchases a certain number of licenses per month to use the location service API. Uses above the amount purchased will be billed as event-based purchases. - **An event-based subscription**, in which the account is billed at the end of the billing cycle for the number of device location requests used. License usage and billing events are counted by device, not by request. A single request to get the location of 10 devices would use 10 licenses or count as 10 billing events, not just 1. Requests for cached location information do not use licenses or count as billing events. **Note:** Only monthly recurring subscriptions are supported at this time. ## 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` | ## HTTP Request [GET https://thingspace.verizon.com/api/loc/v1/subscriptions/{accountName}](/docs/premium-apis/device-location/api-endpoints/devices-location-subscriptions/getlocationservicesubscriptionstatus) ## Request Parameters The `accountName` must be included in the path. |Parameter Name|Data Type|Description| |-----|-----|-----| | **accountName** *(required)* | string | The numeric name of the account to get the subscription status of. Must include any leading zeros. | ## Request Body None. ## Success Response **Status 200** A success response includes the account subscription status in an array. Example Success Response: ```json { "accountName": "0000123456-00001", "locType": "TS-LOC-COARSE-CellID-5K", "maxAllowance": "5000", "purchaseTime": "2024-07-29 06:25:25.171 +0000 UTC", } ``` ## Success Parameters |Parameter Name|Data Type|Description| |-----|-----|-----| | **accountName** | string |The billing account that subscription information was requested from. | | **locType** | string | The Device Location subscription type, which will be one of these values: **TS-LOC-COARSE-CellID-5K**- Monthly recurring subscription for 5,000 non-GPS device locate requests, **TS-LOC-COARSE-CellID-10K** - Monthly recurring subscription for 10,000 non-GPS device locate requests, **TS-LOC-COARSE-CellID-100K** - Monthly recurring subscription for 100,000 non-GPS device locate requests or **TS-LOC-COARSE-CellID-1M** - Monthly recurring subscription for 1,000,000 non-GPS device locate requests. | | **maxAllowance** | string | The number of billable location requests allowed per billing cycle. | | **purchaseTime** | string ($date-time) | The most recent time that licenses were purchased. | ## Failure Responses All error messages are returned in this format: ```json { "errorCode": "The 3-digit HTML error code", "errorMessage": "string" } ``` Error codes and messages are listed on the [Error Codes page](https://thingspace.verizon.com/documentation/api-documentation.html#/http/device-location/error-codes), along with explanations and suggestions for corrective actions.