# Company codes

Source: https://developer.avalara.com/avatax-dm-combined-erp/sales-tax-badge/transactions/simple-transactions/company-codes/

# Company codes

In addition to supporting simple, single-company structures, AvaTax also supports more complex business structures. Specifically, AvaTax supports one-level deep child companies of a parent company. A child company can be a separate filing entity with its own configuration, or it can inherit its taxability settings from the parent company. Each AvaTax account can have as many child companies as necessary to accurately reflect its business structure, and each company is identified by its own unique `companyCode` value in the [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/). This `companyCode` value determines the tax rules that govern a transaction.

If you do not include the `companyCode` when running a transaction, AvaTax will automatically assume that you want to use the default company. Every AvaTax account has a default company, but because a complex business can have dozens of companies, it is considered best practice to always include the `companyCode` value.

As a connector developer, most of your users will have a simple company structure. But whether simple or complex, a best practice is to provide a drop-down list of companies in your user interface and to automatically display (and highlight) the company with the `isDefault` flag set to `true`. To retrieve the list of available companies for your user interface, call the [QueryCompanies API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Companies/QueryCompanies/).

[Previous](/avatax-dm-combined-erp/sales-tax-badge/transactions/simple-transactions)

[Next](/avatax-dm-combined-erp/sales-tax-badge/transactions/simple-transactions/customer-codes)