# getRevenueTransaction

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

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

**API:** Avalara MyLodgeTax API
**Tag:** Revenue
**API Version:** v1.2
**Base URL:** https://mylodgetaxapi-sbx.avalara.net
**Content-Type:** `application/json`
**Authentication:** API Key (`Authorization` in header)

Source: https://developer.avalara.com/products/mylodge/api/methods/Revenue/getRevenueTransaction/

## Description

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. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | OK | `GetRevenueTransactionsResponse` |
| 400 | Bad request: check response body message for details | `ErrorResponse` |
| 404 | Transaction data not found for the given location | `ErrorResponse` |

### 200 Response: `GetRevenueTransactionsResponse`

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

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | string | No | 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 | No | The date that the revenue was reported for. Format will be 'YYYY-MM-DD'. |
| `bookingDate` | string | No | The date that the rental property was booked. Format will be 'YYYY-MM-DD'. |
| `totalRevenue` | number | No | The total revenue amount that was reported. |
| `exemptRevenue` | number | No | The amount of the totalRevenue that is exempt from being taxed. |
| `totalNights` | number | No | The number of nights that the revenue was collected to account for. |
| `exemptNights` | number | No | The number of the totalNights that are exempt from being taxed. |
| `memo` | string | No | Block of text that describes the transaction data. |
| `sourceMarketplace` | string | No | 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'. |

## Example Request

```bash
curl -X GET "https://mylodgetaxapi-sbx.avalara.net/v1/locations/{locationid}/revenuetransactions/{transactionid}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```