> This page is for APIs, version Calculations.
> For other versions, use one of these documentation indexes:
> - Overview (default): https://avalara.ferndocs.com/api-reference/overview/llms.txt
> - Calculations: https://avalara.ferndocs.com/api-reference/calculations/llms.txt
> - E-invoicing: https://avalara.ferndocs.com/api-reference/e-invoicing/llms.txt
> - Brazil: https://avalara.ferndocs.com/api-reference/brazil/llms.txt
> - Returns: https://avalara.ferndocs.com/api-reference/returns/llms.txt
> - Shared service: https://avalara.ferndocs.com/api-reference/shared-service/llms.txt
> - 1099 & W-9: https://avalara.ferndocs.com/api-reference/1099-w9/llms.txt
> - Tax registrations & business licenses: https://avalara.ferndocs.com/api-reference/tax-registrations/llms.txt
> - ECM: https://avalara.ferndocs.com/api-reference/ecm/llms.txt
> - Cross-Border: https://avalara.ferndocs.com/api-reference/cross-border/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://avalara.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://avalara.ferndocs.com/_mcp/server.

# Returns a list of all non-obsolete licensed master company IDs that the requesting user has access to as of the requested date.

GET https://excise.avalara.com/api/v1/Utilities/GetMasterCompanies

> **Access control:** this endpoint is available to users with the `everyone` role.

Returns a list of master company details that the requesting user has access to. Only non-obsolete, licensed
master companies are included. The effective date must not be in the future.
            
Each result includes the master company ID, name, deployment status, active status, and licensing information
for Returns Excise and AvaTax Excise products.

Reference: https://avalara.ferndocs.com/api-reference/calculations/ava-tax-for-excise/public-reference/get-master-companies

## Authentication

- `Authorization` header (required) — API Key authentication via header

## Request

### Query parameters

- `effectiveDate` (datetime, required) — The effective date used to determine accessible master companies.

### Headers

- `X-Avalara-Client` (string, optional, default: Swagger UI; 5.64.21.2340; Custom; 1.0) — Identifies the software you are using to call this API. For more information on the client header, see Client Headers.

## Response

### 200

Returns a list of master company details available to the requesting user.

- `list of Avalara.Excise.Website.Api.v1.MasterCompanyDetails`

## Types

### Avalara.Excise.Website.Api.v1.MasterCompanyDetails

Retrieves the master company information

- `MasterCompanyId` (integer, optional) — Master company ID
- `Name` (string, optional) — Master company name
- `IsDeployed` (boolean, optional) — If the master company is deployed
- `IsActive` (boolean, optional) — If the master company is active
- `HasReturnsExcise` (boolean, optional) — Is returns excise enabled
- `HasAvaTaxExcise` (boolean, optional) — Is AvaTax excise enabled

## Examples

**Response**

```json
[
  {
    "MasterCompanyId": 0,
    "Name": "string",
    "IsDeployed": false,
    "IsActive": false,
    "HasReturnsExcise": false,
    "HasAvaTaxExcise": false
  }
]
```

**SDK Code**

```python
import requests

url = "https://excise.avalara.com/api/v1/Utilities/GetMasterCompanies"

querystring = {"effectiveDate":"effectiveDate"}

headers = {"Authorization": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://excise.avalara.com/api/v1/Utilities/GetMasterCompanies?effectiveDate=effectiveDate';
const options = {method: 'GET', headers: {Authorization: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://excise.avalara.com/api/v1/Utilities/GetMasterCompanies?effectiveDate=effectiveDate"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://excise.avalara.com/api/v1/Utilities/GetMasterCompanies?effectiveDate=effectiveDate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://excise.avalara.com/api/v1/Utilities/GetMasterCompanies?effectiveDate=effectiveDate")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://excise.avalara.com/api/v1/Utilities/GetMasterCompanies?effectiveDate=effectiveDate', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://excise.avalara.com/api/v1/Utilities/GetMasterCompanies?effectiveDate=effectiveDate");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://excise.avalara.com/api/v1/Utilities/GetMasterCompanies?effectiveDate=effectiveDate")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```