# GetMandateDataInputFields

Returns document field information for a country mandate, a selected document type, and its version

`GET /mandates/{mandateId}/data-input-fields`

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

Source: https://developer.avalara.com/products/e-invoicing/api/v1.5/methods/Mandates/GetMandateDataInputFields/

## Description

This endpoint provides document field details and the optionality of fields (required, conditional, optional) of different documents supported by the country mandate. Use the GET /mandates endpoint to retrieve all available country mandates, their supported document types and supported versions. You can use the `documentType` and `documentVersion` query parameters to retrieve the input fields for a particular document type and document version.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `avalara-version` | string | header | Yes | Header that specifies the API version to use (for example "1.5"). |
| `X-Avalara-Client` | string | header | No | Optional header for a client identifier string used for diagnostics (for example "Fingerprint"). |
| `mandateId` | string | path | Yes | Unique identifier of the mandate returned by the GET /mandates endpoint. |
| `documentType` | string | query | Yes | Select the documentType for which you wish to view the data-input-fields (You may obtain the supported documentTypes from the GET /mandates endpoint) |
| `documentVersion` | string | query | Yes | Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Returns a MandateDataInputFieldsResponse object containing the input fields and their optionality for the specified mandate, document type, and document version. | `MandateDataInputFieldsResponse` |
| 400 | Bad request. | `BadRequest` |
| 401 | Unauthorized. |  |
| 403 | Forbidden. | `ForbiddenError` |
| 404 | Resource not found | `NotFoundError` |
| 500 | Internal Server Error | `InternalServerError` |

## Example Request

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