# Entity use codes

Source: https://developer.avalara.com/avatax-dm-combined-erp/sales-tax-badge/transactions/exemptions/entity-use-codes/

# Entity use codes

In AvaTax transactions, the`entityUseCode` field is used to indicate the exempt reason for exempt customers. For example, a purchase made by the US federal government would be designated for government use, and it would generally be exempt or non-taxable for that specific use.

[Entity use codes](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Exempt_reason_matrix_for_the_U.S._and_Canada_entity_use_code_list.html) can be specified at the document level or the line level. When entering transactions with an Entity use code, AvaTax will exempt the transaction as long as the code is valid for the customer and region where the transaction takes place.

Your CRM component should include a field that can identify an exempt customer. Then when a customer is identified by one of the entity use code exempt reasons, and that customer makes a purchase, the corresponding reason should be populated on the [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/) model.

Entity Use Codes are generally displayed in the user interface as a dropdown, combo box, or selection element. This element uses the [ListEntityUseCodes API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListEntityUseCodes/) to retrieve the list of available choices and displays it as a list of values in a dropdown. The default value should be NULL, indicating that by default a transaction does not have a custom entity use code.

Here’s how to find the values and put them into your transaction. First, call the [ListEntityUseCodes API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListEntityUseCodes/). The`code` field is the value you will use, and the field`name` is the description you will show to the customer. You can either show “code - name”, like "A - FEDERAL GOV", or you can just show the name field.

First, call the [ListEntityUseCodes API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListEntityUseCodes/). The`code` field is the value you will use, and the field "name" is the description you will show to the customer. You can either show “code - name”, like "A - FEDERAL GOV", or you can just show the name field.

```
{    "@recordsetCount": 17,    "value": [        {            "code": "A",            "name": "FEDERAL GOV",            "description": "",            "validCountries": [                "US"            ]        },        {            "code": "B",            "name": "STATE GOV",            "decription": "",            "validCountries": [                "US"            ]        },    ]}
```

If the customer is exempt and makes a purchase, put that value in the`entityUseCode` field on the [CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/) element:

```
{    "type": "SalesInvoice",    "companyCode": "DEFAULT",    "date": "2020-12-16",    ...    "entityUseCode": "A",    ...}
```

If the customer is not exempt, omit the`entityUseCode` element entirely, or set its value to null.

[Previous](/avatax-dm-combined-erp/sales-tax-badge/transactions/exemptions/exemption-numbers)

[Next](/avatax-dm-combined-erp/sales-tax-badge/transactions/exemptions/exemption-single-use)