# ResolveAddressPost

Retrieve geolocation information for a specified US or Canadian address

`POST /api/v2/addresses/resolve`

**API:** AvaTax API
**Tag:** Addresses
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Content-Type:** `application/json`
**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/Addresses/ResolveAddressPost/

## Description

Resolve a US or Canadian address against Avalara's address validation system.  Note that this API is 
valid for US and Canadian addresses only.  

If the address can be resolved, this API provides the latitude and longitude of the resolved location.  
The value `resolutionQuality` can be used to identify how closely this address can be located.  If the 
address cannot be clearly located, use the `messages` structure to learn more about problems with this 
address. This is the same API as the GET /api/v2/addresses/resolve endpoint.
Both verbs are supported to provide for flexible implementation.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
* This API depends on the following active services:*Required* (all):  AutoAddress.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `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/) . |

## Request Body

**Schema:** `AddressValidationInfo`

TextCase info for input address

| Property | Type | Required | Description |
|---|---|---|---|
| `line1` | string | No | First line of the street address Example: `2000 Main Street`. |
| `textCase` | string | No | Specify the text case for the validated address result.  If not specified, will return uppercase. Values: `Default`, `Upper`, `Mixed`. Example: `Default`. |
| `line2` | string | No | Second line of the street address |
| `line3` | string | No | Third line of the street address |
| `city` | string | No | City component of the address Example: `Irvine`. |
| `region` | string | No | Name or ISO 3166 code identifying the region within the country.
            
This field supports many different region identifiers:
 * Two and three character ISO 3166 region codes
 * Fully spelled out names of the region in ISO supported languages
 * Common alternative spellings for many regions
            
For a full list of all supported codes and names, please see the Definitions API `ListRegions`. Example: `CA`. |
| `country` | string | No | Name or ISO 3166 code identifying the country.
            
This field supports many different country identifiers:
 * Two character ISO 3166 codes
 * Three character ISO 3166 codes
 * Fully spelled out names of the country in ISO supported languages
 * Common alternative spellings for many countries
            
For a full list of all supported codes and names, please see the Definitions API `ListCountries`. Example: `US`. |
| `postalCode` | string | No | Postal Code / Zip Code component of the address. Example: `92614`. |
| `latitude` | number | No | Geospatial latitude measurement, in Decimal Degrees floating point format. |
| `longitude` | number | No | Geospatial longitude measurement, in Decimal Degrees floating point format. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `AddressResolutionModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |

### 200 Response: `AddressResolutionModel`

Address Resolution Model

| Property | Type | Required | Description |
|---|---|---|---|
| `address` | AddressInfo | No | The original address |
| `validatedAddresses` | ValidatedAddressInfo[] | No | The validated address or addresses |
| `coordinates` | CoordinateInfo | No | The geospatial coordinates of this address |
| `resolutionQuality` | string | No | The resolution quality of the geospatial coordinates Values: `NotCoded`, `External`, `CountryCentroid`, `RegionCentroid`, `PartialCentroid`, `PostalCentroidGood`, `PostalCentroidBetter`, `PostalCentroidBest`, `Intersection`, `Interpolated`, `Rooftop`, `Constant`. Example: `NotCoded`. |
| `taxAuthorities` | TaxAuthorityInfo[] | No | List of informational and warning messages regarding this address |
| `messages` | AvaTaxMessage[] | No | List of informational and warning messages regarding this address |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/addresses/resolve" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "line1": "2000 Main Street",
  "textCase": "Upper",
  "city": "Irvine",
  "region": "CA",
  "country": "US",
  "postalCode": "92614"
}'
```