# 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="upload-purchase-documents/ingest-pr-via-file" %}
[ingest-pr-via-file](upload-purchase-documents/ingest-pr-via-file)
{% 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="upload-purchase-documents/deprecated-ingest-pr-via-json" %}
[deprecated-ingest-pr-via-json](upload-purchase-documents/deprecated-ingest-pr-via-json)
{% 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>
