# Addresses

Source: https://developer.avalara.com/avatax-dm-combined-erp/sales-tax-badge/transactions/simple-transactions/addresses/

# Addresses

Addresses are a crucial part of the sales tax calculation process. There are a number of factors that go into sales tax calculation, but addresses are probably the most important. The total sales tax rate that you pay is generally made up of several smaller rates, and each of those is allocated to a different taxing jurisdiction (think state, county, city).

AvaTax determines the correct taxing jurisdictions based on the addresses provided. This may seem fairly straightforward, but there are a huge number of different taxing jurisdictions, and the boundaries aren’t always clean or simple to determine. Avalara has a content research team that does the legwork on this so you don’t have to – you just need to give us the address, and we’ll determine the correct taxing jurisdictions for you.

## Supported address types

The table below describes the address types supported in AvaTax. The simplest type of transaction is a retail point of sale transaction, where the origin address and the destination address are the same. This type of transaction uses address type `singleLocation`. For example, in this scenario, a customer makes a purchase in a retail location and takes possession of the product(s) at that location.

For transactions where the origin and destination addresses are not the same, the two address types that factor into sales tax calculation are origin addresses and destination addresses. For example, if you live in Washington and you are selling a mug to someone in California, your origin address (of type `shipFrom`) would be Washington and your destination address (of type `shipTo`) would be California.

While only the city, state, and postal code are required for calculation, it’s best practice to provide as much address information as you have available. This will help to ensure the most accurate tax calculation possible.

You can specify addresses at either the document level or the line level.

-   **Document level**: A transaction, as a whole, uses the document level addresses as the default. If a transaction does not have any addresses at the line level, each line will be assumed to use the addresses from the document level. When you record a single transaction, and all invoice lines on the transaction have the same addresses, you only need to set your address values once at the root level of your transaction, no matter how many invoice lines you are calculating.
-   **Line level**: Line level addresses represent individual, separate shipments. It is possible to have a scenario where an end customer is checking out of the cart with the products/services from different merchants. In this case, the `shipFrom` address will be different for some or all lines. Of course, the `shipTo` address is likely to always be the same for a given checkout process, but in this case, pass them together at line level.

**Advice:** Do not create transactions that include both document-level and line-level addresses. For example, if your transaction includes multiple lines, and those lines include line-level addresses, then all lines should include line-level addresses.

Field Name

Attributes

Summary

singleLocation

[AddressLocationInfo](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressLocationInfo/)

Optional

If a transaction occurred at a retail point-of-sale location, provide that single address here and leave all other address types null.

shipFrom

[AddressLocationInfo](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressLocationInfo/)

Optional

The origination address where the products were shipped from or from where the services originated.

shipTo

[AddressLocationInfo](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressLocationInfo/)

Optional

The destination address where the products were shipped to or where the services were delivered.

pointOfOrderAcceptance

[AddressLocationInfo](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressLocationInfo/)

Conditional

The location where the order was accepted by your supplier, such as a call center, business office where purchase orders are accepted, and server locations where orders are processed and accepted.

This address is used to determine the establishment country of your supplier in the transaction.

This address needs to be included for Purchase document types.

pointOfOrderOrigin

[AddressLocationInfo](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressLocationInfo/)

Conditional

The location from where your customer (home or business) placed the order to you. This is used to determine the establishment country of your customer. .

This address needs to be included for Sales document types.

## Specifying latitude and longitude in addresses

In some cases, a location or service site can only be pinpointed by geo location. For these situations, AvaTax supports specifying a latitude and longitude when configuring any of the above address types. If these are provided along with a line, city, region, country, and postal code, AvaTax will use only the latitude and longitude and will discard the line, city, region, country, and postal code information for the transaction.

Please ensure that you have the correct latitude/longitude information for an address prior to using the [AddressLocationInfo API](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressLocationInfo/). If you provide either a latitude or longitude but not both, AvaTax will be use the line, city, region, country, and postal code for the addresses.

**Advice:** Latitude and longitude can only be specified for United States addresses.

## Resolving addresses

We require that you validate/resolve addresses against an address validation system. If you are using Avalara's address validation system, call the [ResolveAddress API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Addresses/ResolveAddress/). (Note again that Avalara's address validation service is only available for US and Canadian addresses.) When you call this API, Avalara will report back a result indicating whether the address can be found or whether any errors or typos have been detected - and your users may appreciate this help when typing in an address. Here’s how to do it:

-   When the user types data into an address field, call [ResolveAddress](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Addresses/ResolveAddress/) with as much information as the user has provided.
-   If the [ResolveAddress](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Addresses/ResolveAddress/) function reports that `ResolutionQuality` is `External` or `NotCoded`, this indicates that AvaTax cannot identify the address the user has typed in. You should give your user a warning and ask if the address is correct.
-   If the user chooses to accept an incorrect address, it is possible to specify line1 = "GENERAL DELIVERY". This is a special code recognized by the USPS that allows non-recognized addresses to be processed even if automated address validation does not identify the correct location. For more information, see the [USPS website on General Delivery](https://pe.usps.com/text/pub28/28c2_033.htm).

[Previous](/avatax-dm-combined-erp/sales-tax-badge/transactions/simple-transactions/document-types)

[Next](/avatax-dm-combined-erp/sales-tax-badge/transactions/non-standard-item-transactions)