# Upload File to Storage

Upload file to AWS S3 Bucket using the pre-signed URL generated in the previous API.

### Request Method

PUT

### Request URL

{{PRE\_SIGNED\_URL}}

### Request Headers

| Parameter    | Data Type | Field Validations                                                                                                  | Description                                                                                                                                                                                              |
| ------------ | --------- | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Content-Type | String    | <p>Enum:<br>application/vnd.ms-excel, </p><p>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</p> | <p>Mandatory. </p><p>Content Type of the file being uploaded. For XLS or CSV, use application/vnd.ms-excel</p><p>For XLSX, use application/vnd.openxmlformats-officedocument.spreadsheetml.sheet<br></p> |

### Request Path Params

There are no path parameters for this API.

### Request Query Params

There are no query parameters for this API.

### Request Body

| Parameter | Data Type | Field Validations                                                                                     | Description                                                                                                                                                                                                                                                                                                                                                                                              |
| --------- | --------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| file      | File      | <p>File type: XLSX, XLS, CSV</p><p><br>MaxRows in CSV: 30 lakh.<br>MaxRows in XLS, XLSX: 10 lakh.</p> | <p>The binary file to be uploaded.<br><br>A file can be either sales, purchase or TDS deductions. Each row in the file represents an invoice line item. <br><br><a href="/pages/EYEp0XJOEXQMmWoe035l">Sale Document Template</a><br><br><a href="/pages/NeMbEIaJApkNDkBvOe6E">Purchase Document Template</a> </p><p></p><p><a href="/pages/89ge0HBl9uJI0KqPoNTc">Deduction Document Line Objects</a></p> |

### Sample Request

```
Attach the binary file as the request payload.
```

### Response Status Codes

| HTTP Status Code | Description                                        |
| ---------------- | -------------------------------------------------- |
| 200              | Successfully uploaded.                             |
| 400              | Bad request (also if the presigned url is expired) |
| 403              | Forbidden (if the presigned url is not valid)      |
| 404              | Not found (if the path or resource does not exist) |

### Sample Response (Success)

Success - HTTP Status Code - 200

### Sample Response(ERROR)

Error - HTTP Status Code - 404

### API Validations

The presigned URL should be valid and not expired.

### API Constraints

Currently, there are no known constraints.&#x20;

{% hint style="info" %}

#### Integrating for MaxITC?

If you are integrating with Max ITC, once the file is uploaded to storage, trigger the reconciliation using the [Trigger MaxITC Workflow API](/cleartax-docs/max-itc-api/max-itc-api-reference/max-itc-apis/trigger-max-itc-workflow.md).
{% endhint %}

{% hint style="info" %}
**Integrating for TDS?**

If you are integrating with TDS, once the file is uploaded to storage, trigger the ingestion using the [Trigger File Ingestion API. ](/cleartax-docs/tds-api/tds-api-reference/tds-apis/upload-deductions/ingest-deductions-via-file/trigger-file-ingestion.md)
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.cleartax.in/cleartax-docs/clear-finance-cloud/cfc-api-reference/ingestion-api/ingest-documents-via-file/upload-file-to-storage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
