# GetCodeListList

Returns a list of code lists for a specific country

`GET /codelists`

**API:** Avalara E-Invoicing API
**Tag:** Code Lists
**API Version:** 1.6
**Base URL:** https://api.sbx.avalara.com/einvoicing
**Authentication:** Bearer token

Source: https://developer.avalara.com/products/e-invoicing/api/v1.6/methods/Code%20Lists/GetCodeListList/

## Description

Get a list of code lists on the Avalara E-Invoicing platform for the specified country. By default, the API returns only non-expired code lists (code lists where the sunset date has not passed). To retrieve expired code lists or filter by specific date ranges, use the effectiveDate and sunsetDate query parameters.A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `avalara-version` | string | header | Yes | Header that specifies the API version to use (for example "1.6"). |
| `X-Avalara-Client` | string | header | No | Optional header for a client identifier string used for diagnostics (for example "Fingerprint"). |
| `countryCode` | string | query | Yes | Two-letter ISO 3166-1 alpha-2 country code indicating the jurisdiction for which code lists should be returned. |
| `effectiveDate` | string | query | No | Filter code lists by effective date. Returns code lists that are effective on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, defaults to the current date. sunsetDate is required when effectiveDate is provided. |
| `sunsetDate` | string | query | No | Filter code lists by sunset date. Returns code lists that have not yet sunset on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, only non-expired code lists are returned. |
| `$count` | string | query | No | When set to true, the response body also includes the count of items in the collection. |
| `$countOnly` | string | query | No | When set to true, the response returns only the count of items in the collection. |
| `undefined` |  |  | No |  |
| `undefined` |  |  | No |  |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | OK | `CodeListListResponse` |
| 400 | Bad request. | `BadRequest` |
| 401 | Unauthorized. |  |
| 403 | Forbidden. | `ForbiddenError` |

### 200 Response: `CodeListListResponse`

Returns the requested list of code lists

| Property | Type | Required | Description |
|---|---|---|---|
| `@recordsetCount` | string | No | Count of code lists for the given query parameters Example: `1`. |
| `@nextLink` | string | No |  |
| `value` | CodeListSummary[] | **Yes** | Array of code lists matching query parameters |

## Example Request

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