# DownloadTaxRatesByZipCode

Download a file listing tax rates by postal code

`GET /api/v2/taxratesbyzipcode/download/{date}`

**API:** AvaTax API
**Tag:** TaxContent
**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/crossborder/api/methods/TaxContent/DownloadTaxRatesByZipCode/

## Description

Download a CSV file containing all five digit postal codes in the United States and their sales
and use tax rates for tangible personal property.
            
Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
that users of this tax content API download new data every day.  Many tax authorities may finalize
decisions on tax changes at unexpected times and may make changes in response to legal issues or
governmental priorities.  Any tax content downloaded for future time periods is subject to change
if tax rates or tax laws change.
            
This rates file is intended to be used as a default for tax calculation when your software cannot
call the `CreateTransaction` API call.  When using this file, your software will be unable to
handle complex tax rules such as:
            
* Zip+4 - This tax file contains five digit zip codes only.
* Different product types - This tax file contains tangible personal property tax rates only.
* Mixed sourcing - This tax file cannot be used to resolve origin-based taxes.
* Threshold-based taxes - This tax file does not contain information about thresholds.
            
If you use this file to provide default tax rates, please ensure that your software calls `CreateTransaction`
to reconcile the actual transaction and determine the difference between the estimated general tax
rate and the final transaction tax.
            
The file provided by this API is in CSV format with the following columns:
            
* ZIP_CODE - The five digit zip code for this record.
* STATE_ABBREV - A valid two character US state abbreviation for this record.  Zip codes may span multiple states.
* COUNTY_NAME - A valid county name for this record.  Zip codes may span multiple counties.
* CITY_NAME - A valid city name for this record.  Zip codes may span multiple cities.
* STATE_SALES_TAX - The state component of the sales tax rate.
* STATE_USE_TAX - The state component of the use tax rate.
* COUNTY_SALES_TAX - The county component of the sales tax rate.
* COUNTY_USE_TAX - The county component of the use tax rate.
* CITY_SALES_TAX - The city component of the sales tax rate.
* CITY_USE_TAX - The city component of the use tax rate.
* TOTAL_SALES_TAX - The total tax rate for sales tax for this postal code.  This value may not equal the sum of the state/county/city due to special tax jurisdiction rules.
* TOTAL_USE_TAX - The total tax rate for use tax for this postal code.  This value may not equal the sum of the state/county/city due to special tax jurisdiction rules.
* TAX_SHIPPING_ALONE - This column contains 'Y' if shipping is taxable.
* TAX_SHIPPING_AND_HANDLING_TOGETHER - This column contains 'Y' if shipping and handling are taxable when sent together.
            
For more detailed tax content, please use the `BuildTaxContentFile` API which allows usage of exact items and exact locations.

### 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 |
|---|---|---|---|---|
| `date` | string | path | Yes | The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31 |
| `region` | string | query | No | A two character region code which limits results to a specific region. |
| `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 | OK |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |

## Example Request

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