# 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="../../resources-and-masters/sale-document-line-object">Sale Document Template</a><br><br><a href="../../resources-and-masters/purchase-document-line-object">Purchase Document Template</a> </p><p></p><p><a href="../../../../tds-api/tds-api-reference/resources-and-masters/deduction-document-line-objects">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](https://docs.cleartax.in/cleartax-docs/max-itc-api/max-itc-api-reference/max-itc-apis/trigger-max-itc-workflow).
{% 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. ](https://docs.cleartax.in/cleartax-docs/tds-api/tds-api-reference/tds-apis/upload-deductions/ingest-deductions-via-file/trigger-file-ingestion)
{% endhint %}
