# ValidateLocation

Validate the location against local requirements

`GET /api/v2/companies/{companyId}/locations/{id}/validate`

**API:** AvaTax API
**Tag:** Locations
**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/Locations/ValidateLocation/

## Description

Returns validation information for this location.
This API call is intended to compare this location against the currently known taxing authority rules and regulations,
and provide information about what additional work is required to completely setup this location.

### Security Policies

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

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The ID of the company that owns this location |
| `id` | integer | path | Yes | The primary key of this location |
| `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 | `LocationValidationModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `LocationValidationModel`

Tells you whether this location object has been correctly set up to the local jurisdiction's standards

| Property | Type | Required | Description |
|---|---|---|---|
| `settingsValidated` | boolean | No | True if the location has a value for each jurisdiction-required setting.
The user is required to ensure that the values are correct according to the jurisdiction; this flag
does not indicate whether the taxing jurisdiction has accepted the data you have provided. Example: `true`. |
| `requiredSettings` | LocationQuestionModel[] | No | A list of settings that must be defined for this location |

## Example Request

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