# 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.1
**Base URL:** https://api.sbx.avalara.com/einvoicing
**Authentication:** Bearer token

Source: https://developer.avalara.com/products/e-invoicing/api/v1.1/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 | The HTTP Header meant to specify the version of the API intended to be used |
| `X-Avalara-Client` | string | header | No | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. |
| `mandateId` | string | path | Yes | The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body |
| `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 | OK | `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"
```