# Understand the Hospitality transactions

Source: https://developer.avalara.com/hospitality-integration-guide/oox3643517402099/

# Understand the Hospitality transactions

Learn about creating and managing hospitality transactions in AvaTax, including required parameters and examples.

As with all AvaTax transactions, AvaTax for Hospitality transactions are created using the [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/). When creating transactions for lodging:

-   `Thequantity` for the lodging line item will always be 1, as this line refers to 1 stay.

-   Use only the `thesingleLocation` address type.

Another distinction is that Hospitality transactions require additional parameters to be specified in the line item model of the request.

**View example**:

```
"parameters":[
  {
      "name":"EstablishmentType",
      "value":"Motel"
   },
  {
      "name":"NumberOfNights",
      "value":"2"
  },
  ...
] 
```

You can retrieve a list of all available parameters using the [ListParametersUsage API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListParametersUsage/). Filter this request using the`productCode` (the`taxCode` you use when creating transactions) along with your region (state) to view a list of parameters that are relevant to your tax code and location. Using the combination of the product code plus the state will return the parameters that are applicable for that code and state combination.

The example shows how to filter parameters based on Lodging tax code SL090200 for the state of Washington.

**View example**:

```
curl
    -X GET
    -H 'Accept: application/json'
    -H 'Authorization: Basic aHR0cHdhdQNoOmY='
    -H 'Content-Type: application/json'
    "https://rest.avatax.com/api/v2/definitions/parametersusage?$filter=productCode eq SL090200 AND region eq WA" 
```