# CertifyIntegration

Checks whether the integration being used to set up this company and run transactions onto this company is compliant to all requirements.

`GET /api/v2/companies/{id}/certify`

**API:** AvaTax API
**Tag:** Companies
**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/Companies/CertifyIntegration/

## Description

Examines the most recent 100 transactions or data from the last month when verifying transaction-related integrations.
For partners who write integrations against AvaTax for many clients, this API is a way to do a quick self testing to verify whether the
written integrations for a company are sufficient enough to be delivered to the respective customers to start using it.
            
This API provides messages specific enough (through predefined checks) to guide the partner on what integrations are still missing from the company to get fully certified.
The API makes the following checks to conclude if the company is NOT fully certified:
1. Any past month items contains generic tax code of P0000000.
2. All the companies on the requesting account are test companies.
3. No Voided/Cancelled documents in the past 30 days.
4. There are less than 2 committed documents.
5. Any documentCode is a generic GUID string.
6. Any customerCode on document is a generic GUID string.
7. No document has more than 1 documentLine.
8. All of the documents have missing exemptionNo, customerUsageType, taxDateOverride or negative amount.
9. Any document quantity is a negative number.
10. Any document have repeated lines.
11. No document has shipping charge.
12. All documents have same ItemCodes, descriptions and taxCodes.
13. Less than 2 addresses used across all documents.
14. Whether locationCode was used in documents.
15. Account with AvaGlobal subscription and no documents have VATBuyerId.
16. Any document has currencyCode not being USD for accounts with AvaGlobal subscription.
17. All documents have countryCode used for accounts with AvaGlobal subscription.

### 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, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `id` | integer | path | Yes | The ID of the company to check if its integration is certified. |
| `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 |  |
| 400 | Bad Request | `ProblemDetails` |
| 401 | Unauthorized | `ProblemDetails` |
| 404 | Not Found | `ProblemDetails` |

## Example Request

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