# Company code

Source: https://developer.avalara.com/avatax-for-ap/cxv6490473271500/

# Company code

Learn about the company code element, its requirements, and how to use the QueryCompanies API to configure it.

**Element type:** Required

**Endpoints/models used:** [QueryCompanies](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Companies/QueryCompanies/)

Your integration must allow users to designate the company within their account that's linked to this integration. Use the [QueryCompanies](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Companies/QueryCompanies/) API to achieve this. This API also tests your connection if a Test connection option isn't available.

The API response will return one of the following:

-   The single company you configured, which is added to the form in your UI.
-   A list of all configured companies if multiple companies exist.

![A screenshot showing an example AvaTax configuration window.](https://avalara-devdocs-prod.mcoutput.com/avatax-for-erps/Content/Resources/Images/DevDot/avatax_settings_504x305.png)

## Example

```
curl
  -X GET
  -H 'Accept: application/json'
  -H 'Authorization: Basic aHR0cHdhdGNoOmY='
  'https://sandbox-rest.avatax.com/api/v2/companies'
```