> For the complete documentation index, see [llms.txt](https://docs.cleartax.in/cleartax-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cleartax.in/cleartax-docs/max-itc-api/max-itc-api-reference/max-itc-apis/upload-purchase-documents.md).

# Upload Purchase Documents

**GST Applicability**: A document can be an invoice, and its related credit note, or debit note. It can also be a bill of supply, and its related credit note, or debit note.

**Amendment**: It can be an original document or an amendment document.

Clear Finance Cloud provides only 1 option to ingest documents:

### Ingest Documents via File API

{% hint style="success" %}
Ingest Documents via File API is the **most recommended** option since it supports uploading documents in the bulk of up to 30 lakh document line items in one workflow which will typically take around 15 mins to complete.
{% endhint %}

{% content-ref url="/pages/2hf2Wz7oTpEbQtJcRjqq" %}
[Ingest PR via File](/cleartax-docs/max-itc-api/max-itc-api-reference/max-itc-apis/upload-purchase-documents/ingest-pr-via-file.md)
{% endcontent-ref %}

### (Deprecated) Ingest Documents via JSON API

{% hint style="warning" %}
Ingest Documents via JSON API is the least recommended option since each request can handle only 100 document line items and can take a long time to upload all documents in batches.
{% endhint %}

<mark style="color:red;">**This API is deprecated and no more supported due to scaling issues.**</mark>

{% content-ref url="/pages/GIol61Gue9jPddxgEdS8" %}
[(Deprecated) Ingest PR via JSON](/cleartax-docs/max-itc-api/max-itc-api-reference/max-itc-apis/upload-purchase-documents/deprecated-ingest-pr-via-json.md)
{% endcontent-ref %}

## Comparison of File API and JSON API

<table><thead><tr><th width="196.33333333333331">Particulars</th><th>File API</th><th>JSON API</th></tr></thead><tbody><tr><td>Processing mode</td><td>Asynchronous</td><td>Synchronous</td></tr><tr><td>Document line items per request</td><td>Up to 30 lakh</td><td>Up to 100</td></tr><tr><td>API Status</td><td>Supported and Recommended</td><td>Deprecated</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cleartax.in/cleartax-docs/max-itc-api/max-itc-api-reference/max-itc-apis/upload-purchase-documents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
