# Avalara MyLodgeTax API

Welcome to the MyLodgeTax Public API page, supporting the Avalara MyLodgeTax product, which provides sales and lodging tax compliance for short-term property rentals.  Find out more about the MyLodgeTax product here: http://www.mylodgetax.com

The API defined here facilitates data exchange between Avalara MyLodgeTax and third-party applications.  Contact MyLodgeTax for information on becoming a MyLodgeTax partner: https://www.avalara.com/mylodgetax/en/contact-us.html
# Authorization
The Authorization header must be provided to use any of the endpoints defined in this document.  This header must be in the following format:

`Authorization: Bearer [apiKey]`

where
* _apiKey_ is a valid, active API key issued by the Avalara MyLodgeTax Partner Manager application
# Functional Overview
In order to exchange tax data with the Avalara MyLodgeTax system, the caller must initiate the onboarding process of a new customer.  This requires a POST to the _partnerleads_ endpoint, with necessary information about the customer and any _locations_ (rental properties) they wish to be managed by Avalara MyLodgeTax.  On successful creation of the partnerLeads resource, a link to a prefilled shopping cart page will be returned in the response.Upon navigating to this link via web browser, the customer will be presented with a prefilled shopping cart that includes the information previously posted to the _partnerleads_ endpoint.  To complete the signup process, the customer will need to supply minimal information on this web page, including a new account password and payment information for their new Avalara MyLodgeTax account.

To determine whether a partnerLead has created an account using the partnerLead link, along with the setup status of all _locations_ passed in the body of the partnerleads POST, the calling system should periodically examine the _Locations_ resource.  Customers and locations are referenced via ids passed in the partnerleads request.  A **200** response indicates that the customer has created a new Avalara MyLodgeTax account, while a **404** response means the account has not yet been created by the customer.  Further information can be read from the locations response body to determine the setup status of each location provided in the partnerleads request.

After a tax rate has been assigned to a location (location has a status of _LicenseSetup_ or _Active_), tax rate information can be read for the location.  High-level tax rate information for locations can be accessed via the _ownertaxsummaries_ resource, while detailed tax rate information can be accessed via the _ownertaxdetails_ resource.
## Onboarding
Onboarding functionality is initiated via the _partnerleads_ endpoint. This endpoint facilitates quick and easy signup of potential MyLodgeTax customers (leads) by providing a link to a prefilled shopping cart page where the user can complete the signup process.  Partners referring leads that complete signup will automatically receive access to pull and push data from/to the customer's Avalara MyLodgeTax account.  Partners are encouraged to present this link to their customers after they have opted in to share their information with Avalara MyLodgeTax via this endpoint.  Avalara MyLodgeTax will also contact the customer via marketing emails and will include this link for convenient signup.

## Tax Rates
Tax Rates are available to partners that have onboarded customers into the Avalara MyLodgeTax system, after the customer has created an account.  After a customer's location has been assigned a tax rate, and while the location maintains an active subscription, daily tax rate information will be available via the _ownertaxsummaries_ and _ownertaxdetails_ endpoints.  Tax rate information returned from these endpoints represents the total tax rate owed by the owner, for:

  * _Direct_ listings (where the customer is responsible for collecting and remitting all taxes due to booking the location through their own means)
  * _Marketplace_ listings (where the customer is only responsible for taxes **not** collected and remitted by the marketplace responsible for the booking).


Tax rates for the following marketplaces are currently supported:

* Airbnb
* FlipKey
* Booking
* Vrbo
## Revenue
The Revenue API provides an easy mechanism for the management of a customer's revenue transactions without having to login directly to the MyLodgeTax website. In addition to allowing partners to directly report lodging sales for a customer's rental property, a revenue transaction can also be updated, deleted, and previously uploaded transaction details can be retrieved.
## API Rate Limits
All endpoints will be rate limited, allowing each partner to make up to 500 requests per minute across all endpoints.

Source: https://developer.avalara.com/products/mylodge/api/

**Version:** v1.2
**Base URL:** https://mylodgetaxapi-sbx.avalara.net

---

## Endpoints

### Onboarding

#### Creates a new partner lead with the given lead information and returns a link where the lead can complete their Avalara MyLodgeTax account creation. Or, in the case of an existing My Lodge Tax customer, returns a link that will allow the customer to log in to the My Lodge Tax Admin Application and link their existing locations to listings in the partner's system.

`POST /v2/partnerleads`

The partnerleads endpoint receives information about the potential customer and one or more locations, and securely stores information received in this request.  **Unique** customer and location identifiers must be provided by the calling system in the request body. For leads with an email address not already associated with an account in the Avalara MyLodgeTax system, the response will contain a hyperlink that uniquely identifies the given request.  The hyperlink can be used by the lead or calling application to display a webpage where the user can complete the Avalara MyLodgeTax account creation process.
>
For leads that already exist in the Avalara MyLodgeTax system (based on email address) a link that will allow the existing customer to link their existing locations to their listings in the partner's system will be returned.
>
For leads that already exist in the Avalara MyLodgeTax system (based on email address), and that have already linked at least one location to their listings in the partner's system, a link to launch the property-linking-wizard in the MyLodgeTax system will be returned.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `request` |  | body | No |  |


### Customer Information

#### Get customer information

`GET /v2/customers/{customerid}`

This customer information endpoint returns the customer ID and the reporting period due date.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `customerid` | string | path | Yes | Unique, partner-specific customer identifier assigned when posting a partnerLead (_customerId_). |

#### Provides access to location information for a given customer.

`GET /v2/customers/{customerid}/locations`

The locations endpoint returns status information about all partner location listings for a given customer that have been synced to the MyLodgeTax system.  Locations can be synced via the partnerLeads POST prior to onboarding or the locations PUT after the customer is onboarded.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `customerid` | string | path | Yes | Unique, partner-specific customer identifier assigned when posting a partnerLead (_customerId_). |

#### Provides a mechanism to update an existing location for an existing customer, or to add a new one if not present.

`PUT /v2/customers/{customerid}/locations/{locationid}`

The PUT method of the locations endpoint provides a way to sync a partner location listing for a given customer to the MyLodgeTax system. All locations synced to MyLodgeTax for a given customer will be displayed to the customer during the property linking process.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `customerid` | string | path | Yes | Unique, partner-specific customer identifier assigned when posting a partnerLead (_customerId_). |
| `locationid` | string | path | Yes | Unique, partner-specific identifier of the location as defined in the calling system |
| `request` |  | body | No |  |

#### Deletes a partner location that belongs to the specified customer

`DELETE /v2/customers/{customerid}/locations/{locationid}`

Allows for the deletion of a partner location listing for a given customer that has been synced to the MyLodgeTax system.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `customerid` | string | path | Yes | Unique, partner-specific customer identifier assigned when posting a partnerLead (_customerId_). |
| `locationid` | string | path | Yes | Unique, partner-specific identifier of the location as defined in the calling system |

#### Creates a new location for a customer

`POST /v2/locations`

The POST method of the location endpoint provides a way to create a new location for a customer in the MyLodgeTax system.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `request` |  | body | Yes |  |

#### Get customer count for a date range

`GET /v2/customers/summary`

The customer summary endpoint returns aggregated information about customers synced to MyLodgeTax within the specified date range. Both startDate and endDate are required and must be in YYYY-MM-DD format.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `startDate` | string | query | Yes | Start date in YYYY-MM-DD format. Optional parameter. Filters customers created on or after this date. |
| `endDate` | string | query | Yes | End date in YYYY-MM-DD format. Optional parameter. Filters customers created on or before this date. |

#### Get customers and their associated locations with pagination and filtering

`GET /v2/customers/locations`

Returns a paginated list of customers, where each customer includes their associated location IDs. Supports optional filtering by date range, sorting by creation date, and pagination using page and pageSize parameters.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `startDate` | string | query | No | Start date in YYYY-MM-DD format. Optional parameter. Filters customers created on or after this date. |
| `endDate` | string | query | No | End date in YYYY-MM-DD format. Optional parameter. Filters customers created on or before this date. |
| `skip` | integer | query | No | Number of records to skip for pagination. Must be >= 0. Defaults to 0 if not provided. |
| `take` | integer | query | No | Number of records to return per page. Must be between 1 and 1000. Defaults to 50 if not provided. |
| `sortColumn` | string | query | No | Field to sort by. Valid values are 'createddate' or 'customerid'. |
| `sortDirection` | string | query | No | Sort order. Valid values are 'asc' or 'desc'. |


### Tax Rate

#### Provides summarized tax responsibilities for the owner of the given location, by marketplace. Tax rate quotes are provided for today.

`GET /v1/locations/{locationid}/ownertaxsummaries`

The ownertaxsummaries endpoint returns summarized tax rate information for taxes owed by the location (property) owner, based on the booking platform.  The Full tax rate responsibility for the owner is represented by the _direct_ marketplace.  Requesting rates for a specific booking marketplace will result in a response containing the balance of taxes the owner is responsible to collect and remit.  This represents the inverse of any taxes the booking marketplace has committed to collecting and remitting.  If no marketplaces are specified in the query string, the response will always contain data for the _direct_ marketplace, plus any rate information for marketplaces that differ from the full rate set represented by the _direct_ marketplace.
>
The total percentage rate is returned as an effective rate.  Meaning, if any component percentage rate for the location is taxable, the _percentEffectiveRate_ will represent a total that includes compounded tax on top of any taxable base.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `locationid` | string | path | Yes | Unique location identifier assigned when posting a partnerLead (_locationId_). |
| `marketplace` | string | query | No | 0...n marketplace parameters may be passed, which may include _direct_. |

#### Provides detailed tax responsibilities for the owner of the given location, by marketplace. Tax rate quotes are provided for today.

`GET /v1/locations/{locationid}/ownertaxdetails`

The ownertaxdetails endpoint returns detailed tax rate information for taxes owed by the location (property) owner, based on the rental platform.  The Full tax rate responsibility for the owner is represented by the _direct_ marketplace.  Requesting rates for a specific marketplace will result in a response containing the balance of taxes the owner is responsible to collect and remit.  This represents the inverse of any taxes the marketplace has committed to collecting and remitting.  If no marketplaces are specified in the query string, the response will always contain data for the _direct_ marketplace, plus any rate information for marketplaces that differ from the full rate set represented by the _direct_ marketplace.
>
Unlike _ownertaxsummaries_, this endpoint will not perform any calculations and therefore, will not compound taxable tax.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `locationid` | string | path | Yes | Unique location identifier assigned when posting a partnerLead (_locationId_). |
| `marketplace` | string | query | No | 0...n marketplace parameters may be included. |


### Revenue

#### Get paginated revenue transactions for a location

`GET /v2/locations/{locationid}/revenuetransactions`

Returns a paginated list of revenue transactions for a location, filtered by date range.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `locationid` | string | path | Yes | Unique location identifier assigned when posting a partnerLead (_locationId_). |
| `startDate` | string | query | Yes | Start date (inclusive) in YYYY-MM-DD format. |
| `endDate` | string | query | Yes | End date (inclusive) in YYYY-MM-DD format. |
| `skip` | integer | query | No | Number of records to skip. |
| `take` | integer | query | No | Number of records to take. |
| `sortColumn` | string | query | No | Column to sort by. |
| `sortDirection` | string | query | No | Sort direction. |

#### Retrieves reported revenue information for a given location by  its transaction id.

`GET /v1/locations/{locationid}/revenuetransactions/{transactionid}`

Returns a revenue transaction for the specified location and transaction id. If there is no such transaction for the given location, a '(404) Not Found' error will be returned.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `locationid` | string | path | Yes | Unique location identifier assigned when posting a partnerLead (_locationId_). |
| `transactionid` | string | path | Yes | Partner-defined unique identifier for a revenue transaction. |

#### Creates or updates revenue information for a given location, stored by the provided transaction id.

`PUT /v1/locations/{locationid}/revenuetransactions/{transactionid}`

The PUT operation of the revenuetransactions endpoint allows for the submittal of revenue information for a given location, to be stored under the provided transaction id.
>
If the provided transaction id already exists, this operation will overwrite the previously submitted data.
>
Booking date, if supplied, cannot be after transaction date.
>
Transaction dates will only be accepted for the current month, or for the previous calendar month, through 04:59:59 am on the first day of the month, U.S. Pacific Time.  Tax returns are filed based on transaction date, and tax monies will be debited from the customer's account during the month the tax return will be filed.  See _API Receipt Start_ and _API Receipt Cutoff_ columns in sample schedules below.
>

Customers with API-linked revenue will be able to confirm revenue via the Avalara MyLodgeTax application starting on the first day of the month at 05:00:00 am, U.S. Pacific Time. See _Customer Confirmation Start_ column in sample schedules below.
>
If a customer does not manually confirm revenue, revenue delivered via this API endpoint will be automatically confirmed after 16:00:00, U.S. Pacific Time, on:
* the fifth day of the month if any of the customer's tax returns are due the tenth day of the month or earlier
* the tenth day of the month if all of the customer's tax returns are due after the tenth day of the month
See _Customer Confirmation Cutoff_ column in sample schedules below.
>
Customer bank accounts will be debited for net tax owed during the month that the tax return is due when revenue is confirmed.  Tax returns will be filed during the same month based on jurisdiction due dates.  See _Filing & Remittal Date_ column below.
>
Sample schedules are as follows:
===
>
Jurisdictions that require monthly filing & remittance
___
Transaction Date  | API Receipt Start | API Receipt Cutoff | Customer Confirmation Start | Customer Confirmation Cutoff  | Filing & Remittal Date
----------------  | ----------------- | ----------------------- | ---------------------  | ----------------------------  | ----------------------
2019-01-**        | 2019-01-01        | 2019-02-01 4:59:59 am PT      | 2019-02-01 5:00:00 am PT                  | 2019-02-05 or 2019-02-10      | 2019-02-05 thru 2019-02-25
2019-02-**        | 2019-02-01        | 2019-03-01 4:59:59 am PT      | 2019-03-01 5:00:00 am PT                  | 2019-03-05 or 2019-03-10      | 2019-03-05 thru 2019-03-25
...               | ...               | ...             | ...                         | ...                              | ...
2019-11-**        | 2019-11-01        | 2019-12-01 4:59:59 am PT      | 2019-12-01 5:00:00 am PT                  | 2019-12-05 or 2019-12-10      | 2019-12-05 thru 2019-12-25
2019-12-**        | 2019-12-01        | 2020-01-01 4:59:59 am PT      | 2020-01-01 5:00:00 am PT                  | 2020-01-05 or 2020-01-10      | 2020-01-05 thru 2020-01-25
>
Jurisdictions that require quarterly filing & remittance (filing dates for sample jurisdiction fiscal year starting January 1; note that some jurisdictions' fiscal years do not start in January)
___
Transaction Date  | API Receipt Start | API Receipt Cutoff | Customer Confirmation Start | Customer Confirmation Cutoff  | Filing & Remittal Date
----------------  | ----------------- | ----------------------- | ---------------------  | ----------------------------  | ----------------------
2019-01-**        | 2019-01-01        | 2019-02-01 4:59:59 am PT      | 2019-02-01 5:00:00 am PT                  | 2019-02-05 or 2019-02-10      | 2019-04-05 thru 2019-04-25
2019-02-**        | 2019-02-01        | 2019-03-01 4:59:59 am PT      | 2019-03-01 5:00:00 am PT                  | 2019-03-05 or 2019-03-10      | 2019-04-05 thru 2019-04-25
2019-03-**        | 2019-03-01        | 2019-04-01 4:59:59 am PT      | 2019-04-01 5:00:00 am PT                  | 2019-04-05 or 2019-04-10      | 2019-04-05 thru 2019-04-25
2019-04-**        | 2019-04-01        | 2019-05-01 4:59:59 am PT      | 2019-05-01 5:00:00 am PT                  | 2019-05-05 or 2019-05-10      | 2019-07-05 thru 2019-07-25
2019-05-**        | 2019-05-01        | 2019-06-01 4:59:59 am PT      | 2019-06-01 5:00:00 am PT                  | 2019-06-05 or 2019-06-10      | 2019-07-05 thru 2019-07-25
2019-06-**        | 2019-06-01        | 2019-07-01 4:59:59 am PT      | 2019-07-01 5:00:00 am PT                  | 2019-07-05 or 2019-07-10      | 2019-07-05 thru 2019-07-25
...               | ...               | ...             | ...                         | ...                              | ...
2019-10-**        | 2019-10-01        | 2019-11-01 4:59:59 am PT      | 2019-11-01 5:00:00 am PT                  | 2019-11-05 or 2019-11-10      | 2020-01-05 thru 2020-01-25
2019-11-**        | 2019-11-01        | 2019-12-01 4:59:59 am PT      | 2019-12-01 5:00:00 am PT                  | 2019-12-05 or 2019-12-10      | 2020-01-05 thru 2020-01-25
2019-12-**        | 2019-12-01        | 2020-01-01 4:59:59 am PT      | 2020-01-01 5:00:00 am PT                  | 2020-01-05 or 2020-01-10      | 2020-01-05 thru 2020-01-25
>
Jurisdictions that require annual filing & remittance (filing dates for sample jurisdiction fiscal year starting January 1; note that some jurisdictions' fiscal years do not start in January)
___
Transaction Date  | API Receipt Start | API Receipt Cutoff | Customer Confirmation Start | Customer Confirmation Cutoff  | Filing & Remittal Date
----------------  | ----------------- | ----------------------- | ---------------------  | ----------------------------  | ----------------------
2019-01-**        | 2019-01-01        | 2019-02-01 4:59:59 am PT      | 2019-02-01 5:00:00 am PT                  | 2019-02-05 or 2019-02-10      | 2020-01-05 thru 2020-01-25
2019-02-**        | 2019-02-01        | 2019-03-01 4:59:59 am PT      | 2019-03-01 5:00:00 am PT                  | 2019-03-05 or 2019-03-10      | 2020-01-05 thru 2020-01-25
...               | ...               | ...             | ...                         | ...                              | ...
2019-11-**        | 2019-11-01        | 2019-12-01 4:59:59 am PT      | 2019-12-01 5:00:00 am PT                  | 2019-12-05 or 2019-12-10      | 2020-01-05 thru 2020-01-25
2019-12-**        | 2019-12-01        | 2020-01-01 4:59:59 am PT      | 2020-01-01 5:00:00 am PT                  | 2020-01-05 or 2020-01-10      | 2020-01-05 thru 2020-01-25

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `locationid` | string | path | Yes | Unique location identifier assigned when posting a partnerLead (_locationId_). |
| `transactionid` | string | path | Yes | Partner-defined unique identifier for a revenue transaction. |
| `request` |  | body | Yes |  |

#### Deletes revenue information that was previously entered for the  given location and transaction id.

`DELETE /v1/locations/{locationid}/revenuetransactions/{transactionid}`

Allows for the deletion of a revenue transaction that has previously been entered for a location.
>
Note that revenue data that was reported in the prior reporting month (or earlier) cannot be deleted.  For example, a transaction with a March transaction date cannot be deleted after April 2.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `locationid` | string | path | Yes | Unique location identifier assigned when posting a partnerLead (_locationId_). |
| `transactionid` | string | path | Yes | Partner-defined unique identifier for a revenue transaction. |

#### Bulk creates revenue transactions.

`POST /v1/revenuetransactions`

The POST operation of the revenuetransactions endpoint allows for the  submittal of bulk revenue information.
>
Reference to PUT /v1/locations/{locationid}/revenuetransactions/{transactionid} for the details of each revenue transaction field

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `request` |  | body | Yes |  |

#### Retrieves revenue information for a given location within a date range.

`GET /v1/location/{externalId}/revenue/{startDate}/{endDate}`

Returns revenue data for the specified location and date range, including gross revenue and marketplace-specific information.

**Parameters:**

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `externalId` | string | path | Yes | Unique location identifier assigned when posting a partnerLead. |
| `startDate` | string | path | Yes | Start date for revenue data in YYYY-MM-DD format. |
| `endDate` | string | path | Yes | End date for revenue data in YYYY-MM-DD format. |

---

## Models

### PostPartnerLeadsRequest

Request body definition for call to POST /v1/partnerleads

| Property | Type | Description |
|---|---|---|
| `customer` | Customer |  |
| `locations` | ArrayOfOnboardingLocations |  |

### Customer

Represents a customer or potential customer.  When used as input, all fields are required.

| Property | Type | Description |
|---|---|---|
| `customerId` | string | Unique, partner-specific identifier of the customer as defined in the calling system |
| `firstName` | string | Customer's first name (given name) |
| `lastName` | string | Customer's last name (surname) |
| `email` | string | Customer's email address; will be used for MyLodgeTax account username when signup is completed. |
| `phoneNumber` | string | Customer's phone number |
| `billingAddress` | Address |  |

### Address

Represents a physical address.  When used as input, all fields are required -except- addressLine2

| Property | Type | Description |
|---|---|---|
| `addressLine1` | string | First line of a physical address |
| `addressLine2` | string | Second line of a physical address |
| `city` | string | City of a physical address |
| `state` | string | State or province of a physical address |
| `country` | string | Country of a physical address |
| `postalCode` | string | Postal code of a physical address |

### License

Optional license information for the location.

| Property | Type | Description |
|---|---|---|
| `numBedrooms` | integer | Number of bedrooms in the location |
| `maxOccupancy` | integer | Maximum occupancy for the location |
| `estimatedAnnualGrossReceipts` | number | Estimated annual gross receipts for the location |
| `hasExistingLicenses` | boolean | Indicates if the location has existing licenses |
| `localContact` | object | Local contact information for the location |

### ArrayOfOnboardingLocations

Array of Location objects

### ArrayOfPersonOwners

Array of Person Owners

### PersonOwner

Represents a owner being onboarded for a location. When used as input, the address for location must currently be in the United States (country: us)

| Property | Type | Description |
|---|---|---|
| `firstName` | string | First name of the owner |
| `lastName` | string | Last name of the owner |
| `ssn` | string | SSN or the tax payer identification number |
| `percentageOwned` | integer | Percentage owned by a particular owner, sum of percentage for all the owners belonging to the location should sum up to 100 |
| `phone` | string | Phone of the person owner |
| `ownerInfo` | OwnerInfo |  |

### OwnerInfo

Gather the address and the email for the respective owner.

| Property | Type | Description |
|---|---|---|
| `addressLine1` | string | Line1 of the owner address |
| `addressLine2` | string | Line2 of the owner address |
| `city` | string | City of the owner address |
| `state` | string | State of the owner address |
| `postalCode` | string | Postal Code of the owner address |
| `isDefaultOwner` | boolean | Determines if the respective owner is the default owner |
| `email` | string | Email address of the person owner |

### OnboardingLocation

Represents a location being onboarded. When used as input, the address for location must currently be in the United States (country: us)

| Property | Type | Description |
|---|---|---|
| `locationId` | string | Unique, partner-specific identifier of the location as defined in the calling system |
| `nickname` | string | Short name of the location |
| `address` | Address |  |
| `personOwners` | ArrayOfPersonOwners |  |
| `licenseInfo` | License | Optional license information for the location. |

### PutLocationLeadRequest

Represents a location definition to modify or create as part of a PUT request. The address must currently be in the United States (country: us).

| Property | Type | Description |
|---|---|---|
| `nickname` | string | Short name of the location |
| `address` | Address |  |
| `personOwners` | ArrayOfPersonOwners | Array of person owners for the location |
| `licenseInfo` | License | Optional license information for the location. |

### PostLocationRequest

Represents a location definition to create as part of a POST request. The address must currently be in the United States (country: us).

| Property | Type | Description |
|---|---|---|
| `customerId` | string | Unique, partner-specific customer identifier |
| `locationId` | string | Unique, partner-specific identifier of the location |
| `nickname` | string | Short name of the location |
| `address` | Address |  |
| `personOwners` | ArrayOfPersonOwners | Array of person owners for the location |
| `licenseInfo` | License | Optional license information for the location. |

### ErrorResponse

Generic response message containing error detail

| Property | Type | Description |
|---|---|---|
| `message` | string |  |

### PostPartnerLeadsResponse

Representation of a successful response from a POST /v1/partnerleads operation

| Property | Type | Description |
|---|---|---|
| `registerLink` | string |  |

### PostPartnerLeadsResponseErrorDataExists

Error response returned when customer or location with given id already exists.

| Property | Type | Description |
|---|---|---|
| `message` | string |  |
| `addPropertyLink` | string | Link to Avalara MyLodgeTax application page where user can create additional locations in existing account. |

### ArrayOfLocations

Array of Location objects

### Location

Representation of a location

| Property | Type | Description |
|---|---|---|
| `name` | string |  |
| `id` | string |  |
| `status` | string |  |

### GetCustomerLocationsResponseV2

Representation of a successful response from a GET /v2/customers/{customerId}/locations

| Property | Type | Description |
|---|---|---|
| `locations` | ArrayOfLocationsV2 |  |

### ArrayOfLocationsV2

Array of LocationV2 objects

### LocationV2

Representation of a location in V2 of the API

| Property | Type | Description |
|---|---|---|
| `id` | string | Unique, partner-specific identifier of the location |
| `nickname` | string | Short name of the location |
| `status` | string |  |
| `address` | Address |  |
| `personOwners` | ArrayOfPersonOwners |  |
| `licenseInfo` | License |  |

### GetOwnerTaxSummariesResponse

Representation of a successful response from a GET /v1/locations/{locationId}/ownertaxsummaries

| Property | Type | Description |
|---|---|---|
| `taxSummaries` | ArrayOfTaxSummaries |  |

### ArrayOfTaxSummaries

Array of Tax Summary objects

### TaxSummary

A tax summary for one marketplace (or a _direct_ marketplace)

| Property | Type | Description |
|---|---|---|
| `marketplace` | string |  |
| `percentEffectiveRate` | number |  |
| `fixedTaxes` | ArrayOfFixedTaxSummaries |  |

### ArrayOfFixedTaxSummaries

Array of Fixed Tax Summary objects

### FixedTaxSummary

Total of fixed taxes for a given unit of measure (e.g. nightly taxes)

| Property | Type | Description |
|---|---|---|
| `totalAmount` | number | Total fixed amount to collect in local currency, for the given unit of measure |
| `unitOfMeasure` | string | Unit of measure for the fixed tax |

### GetOwnerTaxDetailsResponse

Representation of a successful response from a GET /v1/locations/{locationId}/ownertaxdetails

| Property | Type | Description |
|---|---|---|
| `taxSummaries` | ArrayOfTaxDetails |  |

### ArrayOfTaxDetails

Array of Tax Detail objects

### TaxDetail

A tax detail for one marketplace (or a _direct_ marketplace)

| Property | Type | Description |
|---|---|---|
| `marketplace` | string |  |
| `percentTaxes` | ArrayOfPercentTaxDetails |  |
| `fixedTaxes` | ArrayOfFixedTaxDetails |  |

### ArrayOfPercentTaxDetails

Array of Percent Tax Detail objects

### ArrayOfFixedTaxDetails

Array of Percent Tax Detail objects

### PercentTaxDetail

A tax detail representing percentage-based taxes

| Property | Type | Description |
|---|---|---|
| `jurisdiction` | string | Name of taxing jurisdiction |
| `name` | string | Name of tax rate |
| `rate` | number | Percent rate, represented as a decimal |
| `taxable` | boolean | Flag indicating whether this tax rate can be taxed by other taxes |

### FixedTaxDetail

A tax detail representing fixed taxes, collected in local currency

| Property | Type | Description |
|---|---|---|
| `jurisdiction` | string | Name of taxing jurisdiction |
| `name` | string | Name of tax rate |
| `unitOfMeasure` | string |  |
| `amount` | number | Tax amount to collect per unit, in local currency |
| `taxable` | boolean | Flag indicating whether this tax can be taxed by other taxes |

### PostRevenueTransactionsRequest

Array of Revenue Transaction objects

### RevenueTransaction

Request body definition for call to POST  /v1/revenuetransactions. The fields 'memo', 'bookingDate', and 'sourceMarketplace' are optional.

| Property | Type | Description |
|---|---|---|
| `transactionId` | string | The unique identifier for the transaction data. |
| `locationId` | string | Unique location identifier assigned when posting a partnerLead. |
| `transactionDate` | string | The date that the revenue is being reported for. Expected date format  is 'YYYY-MM-DD'. |
| `totalRevenue` | number | The total revenue amount being reported.  Tax should not be included in this value. |
| `exemptRevenue` | number | The amount of the totalRevenue that is exempt from being taxed. |
| `totalNights` | number | The number of nights that the revenue was collected for. |
| `exemptNights` | number | The number of the totalNights that are exempt from being taxed. |
| `memo` | string | Memo field that describes the transaction data.  This is what the customer will see in the Avalara MyLodgeTax application.  Although optional, partners are strongly encouraged to provide a meaningful description for the customer's reference. |
| `sourceMarketplace` | string | The marketplace that the transaction applies to (e.g. AirbnB,  Vrbo, etc). This field does not need to be supplied from partners who represent a single marketplace; sourceMarketplace will be inferred from your API key.
For partners that list on multiple third-party marketplaces, this field is required, so that the correct customer-owed tax can be computed, based on the tax that the given marketplace is known to collect and remit. If the the sourcemarketplace is left out, the revenue will default to 'Direct'. |
| `bookingDate` | string | The date that the rental property was booked. Expected date format  is 'YYYY-MM-DD'. |

### PutRevenueTransactionsRequest

Request body definition for call to PUT /v1/locations/{locationid}/revenuetransactions/{transactionid}. The fields 'memo', 'bookingDate', and 'sourceMarketplace' are optional.

| Property | Type | Description |
|---|---|---|
| `transactionDate` | string | The date that the revenue is being reported for. Expected date format is 'YYYY-MM-DD'. |
| `totalRevenue` | number | The total revenue amount being reported.  Tax should not be included in this value. |
| `exemptRevenue` | number | The amount of the totalRevenue that is exempt from being taxed. |
| `totalNights` | number | The number of nights that the revenue was collected for. |
| `exemptNights` | number | The number of the totalNights that are exempt from being taxed. |
| `memo` | string | Memo field that describes the transaction data.  This is what the customer will see in the Avalara MyLodgeTax application.  Although optional, partners are strongly encouraged to provide a meaningful description for the customer's reference. |
| `sourceMarketplace` | string | The marketplace that the transaction applies to (e.g. AirbnB, Vrbo, etc). This field does not need to be supplied from partners who represent a single marketplace; sourceMarketplace will be inferred from your API key.
For partners that list on multiple third-party marketplaces, this field is required, so that the correct customer-owed tax can be computed, based on the tax that the given marketplace is known to collect and remit. |
| `bookingDate` | string | The date that the rental property was booked. Expected date format is 'YYYY-MM-DD'. |

### GetRevenueTransactionsResponse

The transaction data that corresponds to the provided locationid and transactionid.

| Property | Type | Description |
|---|---|---|
| `id` | string | The unique identifier for the transaction data. Will always be the same as what was input in the 'transactionid' field in the url. |
| `date` | string | The date that the revenue was reported for. Format will be 'YYYY-MM-DD'. |
| `bookingDate` | string | The date that the rental property was booked. Format will be 'YYYY-MM-DD'. |
| `totalRevenue` | number | The total revenue amount that was reported. |
| `exemptRevenue` | number | The amount of the totalRevenue that is exempt from being taxed. |
| `totalNights` | number | The number of nights that the revenue was collected to account for. |
| `exemptNights` | number | The number of the totalNights that are exempt from being taxed. |
| `memo` | string | Block of text that describes the transaction data. |
| `sourceMarketplace` | string | The marketplace that the transaction applies to (e.g. AirBnB, Vrbo, etc). If this revenue does not apply to a specific marketplace, it will be 'null'. |

### CustomerInfoResponse

| Property | Type | Description |
|---|---|---|
| `customerId` | string | The unique customer ID |
| `reportingDueDate` | string | The reporting period due date |

### CustomerLocationsResponse

Represents the paginated list of customer locations for a specified date range.

| Property | Type | Description |
|---|---|---|
| `locations` | ArrayOfLocations |  |
| `totalPages` | integer | Total number of pages available |
| `currentPage` | integer | Current page number |
