# RequestCertificateSetup

Request setup of exemption certificates for this company.

`POST /api/v2/companies/{companyId}/certificates/setup`

**API:** AvaTax API
**Tag:** Certificates
**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/avatax/api/methods/Certificates/RequestCertificateSetup/

## Description

Requests the setup of exemption certificates for this company.
            
Exemption certificates are tracked through a different auditable data store than the one that
holds AvaTax transactions.  To use the AvaTax exemption certificate document store, please call
`GetCertificateSetup` to see if your company is configured to use the exemption certificate
document store.  To request setup, please call `RequestCertificateSetup` and your company will
be configured with data storage in the auditable certificate system.
            
This API will return the current status of exemption certificate setup for this company.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
* This API depends on the following active services:*Required* (all):  AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes |  |
| `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 | `ProvisionStatusModel` |
| 400 | Bad Request | `ProblemDetails` |
| 401 | Unauthorized | `ProblemDetails` |
| 404 | Not Found | `ProblemDetails` |

### 200 Response: `ProvisionStatusModel`

Contains information about a company's exemption certificate status.
            
This model can be used to determine if your company is able to use the Customers, Certificates, and
CertExpressInvites APIs within AvaTax.

| Property | Type | Required | Description |
|---|---|---|---|
| `status` | string | No | The status of exemption certificate setup for this company.
            
If this value is `Finished`, this company will then be able to use the Customers, Certificates, and
CertExpressInvites APIs within AvaTax. Values: `Provisioned`, `InProgress`, `NotProvisioned`. Example: `Provisioned`. |
| `accountId` | integer | No | The accountId of the company represented by this status Example: `12345`. |
| `companyId` | integer | No | The AvaTax company represented by this status Example: `6789`. |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/certificates/setup" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```