# Fetch Max ITC Configuration

Upload a sale document with JSON payload.

### Request Method

GET

### Request URL

<pre><code><strong>{{BASE_URL}}/integration/v1/config/get
</strong></code></pre>

{% hint style="info" %}
Replace the `{{BASE_URL}}` with the one mentioned [here](https://docs.cleartax.in/cleartax-docs/gst-api/gst-2.0-api-reference) based on whether you are using sandbox or production.
{% endhint %}

### Request Headers

<table><thead><tr><th width="183">Parameter</th><th width="129">Data Type</th><th>Field Validations</th><th>Description</th></tr></thead><tbody><tr><td>x-cleartax-auth-token</td><td>String</td><td>Cannot be empty.</td><td>Mandatory. <a href="../../../clear-finance-cloud/learn-clear-finance-cloud-basics/access-token">User auth token</a>.</td></tr></tbody></table>

### Request Path Params

There are no path parameters for this API.

### Request Query Params

There are no query parameters for this API.

### Request Body

There is no request body for this API.

### Sample Request

```
GET https://api-sandbox.clear.in/integration/v1/config/get
```

### Response Status Codes

<table><thead><tr><th width="192">HTTP Status Code</th><th>Description</th></tr></thead><tbody><tr><td>200</td><td>Configuration is fetched successfully.</td></tr><tr><td>400</td><td>If the request schema is not valid.</td></tr><tr><td>401</td><td>If the user is not authenticated for the operation.</td></tr><tr><td>403</td><td>If the user is not authorized for the operation.</td></tr><tr><td>500</td><td>If there are any unhandled exceptions on Clear side.</td></tr></tbody></table>

### Response Schema

<table><thead><tr><th width="184">Parameter</th><th width="113">Data Type</th><th width="97">Field Constraints</th><th>Description</th></tr></thead><tbody><tr><td>userEmail</td><td>String</td><td></td><td>User email as registered on Clear.</td></tr><tr><td>customTemplateId</td><td>String</td><td>UUID</td><td>Custom template ID to be used for uploading purchase documents.</td></tr><tr><td>reconType</td><td>String</td><td>Enum: MAX_ITC_2A_PR,  MAX_ITC_2B_PR, MAX_ITC_6A_PR,  MAX_ITC_8A_PR</td><td><p>Type of reconciliation to be triggered.</p><p>MAX_ITC_2A_PR - Govt 2A vs Taxpayer PR MAX_ITC_2B_PR - Govt 2B vs Taxpayer PR MAX_ITC_6A_PR - Govt 6A vs Taxpayer PR MAX_ITC_8A_PR - Govt 8A vs Taxpayer PR</p></td></tr><tr><td>sectionNames</td><td>Array</td><td>Enum: </td><td>An array of Section Names for which 2A or 2B is to be downloaded.</td></tr><tr><td>pullReturnPeriodStart</td><td>String</td><td>Format: MMYYYY</td><td>Return period from which the 2A or 2B data is to be downloaded from GSTN.</td></tr><tr><td>pullReturnPeriodEnd</td><td>String</td><td>Format: MMYYYY</td><td>Return period up to which the 2A or 2B data is to be downloaded from GSTN.<br>Default: Current return period</td></tr><tr><td>reconReturnPeriodStart</td><td>String</td><td>Format: MMYYYY</td><td>Return period from which the purchase data is to be considered in Clear.</td></tr><tr><td>reconReturnPeriodEnd</td><td>String</td><td>Format: MMYYYY</td><td>Return period up to which the purchase data is to be considered in Clear.<br>Default: Current return period</td></tr><tr><td>active</td><td>Boolean</td><td>NA</td><td>Configuration Status. The flag specifies if the configuration is active or inactive.</td></tr><tr><td>error</td><td>String</td><td>Enum: AUTHORIZATION_FAILED, NOT_CONFIGURED</td><td><p>Error code.<br>AUTHORIZATION_FAILED - If authorization failed.</p><p>NOT_CONFIGURED - If the configuration is not available.</p></td></tr></tbody></table>

### Sample Response

Success - HTTP Status Code - 200

{% code lineNumbers="true" %}

```json
{
  "userEmail": "user@cleartax.in",
  "customTemplateId": "60e5613ff71f4a7aeca4336b",
  "reconType": "MAX_ITC_2A_PR",
  "sectionNames": [
    "B2B",
    "CDN"
  ],
  "pullReturnPeriodStart": "042021",
  "pullReturnPeriodEnd": "122021",
  "reconReturnPeriodStart": "042021",
  "reconReturnPeriodEnd": "122021",
  "active": true,
  "error": null
}
```

{% endcode %}

Authentication Error - HTTP Status Code - 401

{% code lineNumbers="true" %}

```json
[
  {
    "errorCode": "INTERNAL_ERROR",
    "errorMessage": "Required request header 'x-cleartax-auth-token' for method parameter type String is not present",
    "errorField": null,
    "errorValues": null,
    "errorResolution": null
  }
]
```

{% endcode %}

### API Validations

1. A valid auth token is required.
2. A configuration must have been already set up in your Clear account.

### API Constraints

1. This API needs to be authenticated with a valid user authentication token. If the auth token is not present or is invalid, the API will return HTTP Status Code 401.
2. If the auth token is valid, but the user does not have the authorization, then the API will return HTTP Status Code 403. The user, whose auth token is used, should have permission to create a document.
