# GetSubscription

Retrieve a single subscription

`GET /api/v2/accounts/{accountId}/subscriptions/{id}`

**API:** AvaTax API
**Tag:** Subscriptions
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/crossborder/api/methods/Subscriptions/GetSubscription/

## Description

Get the subscription object identified by this URL.
A 'subscription' indicates a licensed subscription to a named Avalara service.
To request or remove subscriptions, please contact Avalara sales or your customer account manager.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `accountId` | integer | path | Yes | The ID of the account that owns this subscription |
| `id` | integer | path | Yes | The primary key of this subscription |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `SubscriptionModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `SubscriptionModel`

Represents a service that this account has subscribed to.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | The unique ID number of this subscription. Example: `12345`. |
| `accountId` | integer | No | The unique ID number of the account this subscription belongs to. Example: `123456789`. |
| `subscriptionTypeId` | integer | No | The unique ID number of the service that the account is subscribed to. If this is provided, subscription description is ignored. Example: `2`. |
| `subscriptionDescription` | string | No | A friendly description of the service that the account is subscribed to. You can either provide the subscription type Id or this but not both. If
subscription type Id is provided, then this information is ignored and this field will be updated with the information from subscription type id. Example: `AvaTaxPro`. |
| `effectiveDate` | string | No | The date when the subscription began. Example: `2015-01-01T00:00:00`. |
| `endDate` | string | No | If the subscription has ended or will end, this date indicates when the subscription ends. |
| `createdDate` | string | No | The date when this record was created. |
| `createdUserId` | integer | No | The User ID of the user who created this record. |
| `modifiedDate` | string | No | The date/time when this record was last modified. |
| `modifiedUserId` | integer | No | The user ID of the user who last modified this record. |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/accounts/{accountId}/subscriptions/{id}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```