# GetDataInputFields

Returns the optionality of document fields for different country mandates

`GET /data-input-fields`

**API:** Avalara E-Invoicing API
**Tag:** Data Input Fields
**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/Data%20Input%20Fields/GetDataInputFields/

## Description

This endpoint returns a list of required, conditional, and optional fields for each country mandate. Use the mandates endpoint to retrieve all available country mandates. Use the $filter query parameter to retrieve fields for a specific mandate.

## 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"). |
| `$filter` | string | query | No | Filter by field name and value. This filter supports only eq and contains. For more information, refer to the Avalara filtering guide. |
| `undefined` |  |  | No |  |
| `undefined` |  |  | No |  |
| `$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. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Returns a DataInputFieldsResponse object containing the data input fields and their optionality for the requested mandate. | `DataInputFieldsResponse` |
| 401 | Unauthorized. |  |
| 403 | Forbidden. | `ForbiddenError` |
| 500 | Internal server error. | `InternalServerError` |

### 200 Response: `DataInputFieldsResponse`

| Property | Type | Required | Description |
|---|---|---|---|
| `@recordsetCount` | number | No | Total count of results Example: `1`. |
| `@nextLink` | string | No |  |
| `value` | DataInputField[] | No | Array of Data Input Fields |

## Example Request

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