# Get data input fields by mandate

Source: https://developer.avalara.com/products/e-invoicing/integration-guides/elr/qnv0263667424954/

Guide: E-Invoicing and Live Reporting

# Get data input fields by mandate

Retrieve input fields and their requirements for a specific mandate, document type, and version in ELR.

**Endpoint**: `GET /einvoicing/mandates/:mandateId/data-input-fields?documentType=ubl-invoice&documentVersion=2.1`

This endpoint returns document field details and the optionality of fields (required, conditional, or optional) for documents supported by a country mandate.

Use the [GetMandates](https://developer.avalara.com/api-reference/e-invoicing/v1.6/methods/Mandates/GetMandates/) endpoint to retrieve available country mandates, supported document types, and supported versions.

Use the `documentType` and `documentVersion` query parameters to retrieve input fields for a specific document type and version.

Allow users to retrieve a list of required input fields for a selected `countryMandate`.

These fields must be included in the UBL XML. This functionality helps users quickly create or update mappings and supports a smoother onboarding and configuration process.

**Headers**

Name

Description

**avalara-version**

(Required) Specifies the version of the API to use.

**X-Avalara-Client**

Provided by Avalara. This value is assigned by Partner Launch Services and helps identify your integration.

**Accept**

application/json

**Query parameters**

Name

Description

`documentType`

(Required) The document type for which to retrieve data input fields. Example: `ubl-invoice`. Supported values are available from the `GET /einvoicing/mandates` endpoint.

`documentVersion`

(Required) The version of the selected document type. Example: `2.1`. Supported values are available from the `GET /einvoicing/mandates` endpoint.

**Path parameters**

Name

Description

`mandateId`

(Required) The ID of the country mandate. Example: `BE-B2B-PEPPOL`.

## Example request

```
curl --location '/einvoicing/mandates/BE-B2B-PEPPOL/data-input-fields?documentType=ubl-invoice&documentVersion=2.1' \
--header 'avalara-version: 1.5' \
--header 'X-Avalara-Client: ProvidedToYouByAvalara' \
--header 'Accept: application/json'
```