# GetCompanies

List companies

`GET /w9/companies`

**API:** Avalara 1099 & W-9 API Definition
**Tag:** Companies W9
**API Version:** 2.0
**Base URL:** https://api.sbx.avalara.com/avalara1099
**Authentication:** Bearer token

Source: https://developer.avalara.com/products/avalara-1099-and-w9/api/methods/Companies%20W9/GetCompanies/

## Description

List existing companies. Filterable/Sortable fields are: "name", "referenceId", "group.name", "createdAt" and "updatedAt".

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `$filter` | string | query | No | A filter statement to identify specific records to retrieve.
For more information on filtering, see Filtering in REST. |
| `$top` | integer | query | No | If zero or greater than 1000, return at most 1000 results.
Otherwise, return this number of results.
Used with skip to provide pagination for large datasets. |
| `$skip` | integer | query | No | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. |
| `$orderBy` | string | query | No | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. |
| `count` | boolean | query | No | If true, return the global count of elements in the collection. |
| `countOnly` | boolean | query | No | If true, return ONLY the global count of elements in the collection.
It only applies when count=true. |
| `avalara-version` | string | header | Yes | API version |
| `X-Correlation-Id` | string | header | No | Unique correlation Id in a GUID format |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | List of companies | `PaginatedQueryResultModel_CompanyResponse` |
| 400 | Bad request (e.g., invalid sort key) | `ErrorResponse` |
| 401 | Authentication failed |  |
| 404 | Not Found | `ErrorResponse` |
| 500 | Server Error | `ErrorResponse` |

### 200 Response: `PaginatedQueryResultModel_CompanyResponse`

Generic paginated model to wrap query response data

| Property | Type | Required | Description |
|---|---|---|---|
| `@recordsetCount` | integer | No |  |
| `value` | CompanyResponse[] | No |  |
| `@nextLink` | string | No |  |

## Example Request

```bash
curl -X GET "https://api.sbx.avalara.com/avalara1099/w9/companies" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```