Get Pre-signed URL
You can generate pre-signed URL using this API.
Request Method
GET
Request URL
Request Headers
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
x-cleartax-auth-token | String | NA | Mandatory. User Auth token |
tan | String | NA | Mandatory. TAN of deductor |
fileContentType | ENUM(XLS/XLSX/CSV) | File type | Mandatory. |
Request Path Params
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
templateType | String | Enum: tds | This will always be “tds”. |
Request Query Params
Paramter | Data Type | Field Validations | Description |
---|---|---|---|
fileName | String | NA | Name of the file to be uploaded (eg. filename.xlsx) |
Request Body
There will be no request body for this API.
Response Status Codes
HTTP Status Code | Description |
---|---|
200 | For a successfully processed request (may be a success or validation error). |
401 | If the user is not authenticated for the operation. |
403 | If the user is not authorized for the operation. |
500 | If there are any unhandled exceptions on Clear side. |
Response Schema
Paramter | Data Type | Field Validations | Description |
---|---|---|---|
status | String | Enum: CREATED, FAILED | Status of generate pre-signed URL action. CREATED - Pre-signed URL is generated. FAILED - Pre-signed URL is not generated. |
preSignedS3Url | String | MaxLength: 2048 | The pre-signed URL string. This URL is valid only for 10 minutes from the time of generation. |
errors | Array | NA | Array of Error Objects. If there are no errors, this will be an empty array. |
Error Object
Parameter | DataType | Field Validation | Description |
---|---|---|---|
errorCode | String | enum: AUTHORIZATION_FAILED, LICENSE_EXPIRED | AUTHORIZATION_FAILED- Invalid Auth Token passed, LICENSE_EXPIRED- Account License has expired Error code |
errorField | String | NA | Error field. If there is no error field, then this will be null. |
errorValues | String | NA | Array of strings. Error values. If there are no error values, then this will be null. |
errorMessage | String | NA | Error message |
Sample Response
Success - HTTP Status Code - 200
Error - HTTP Status Code - 401
API Validations
Filename cannot be empty.
Template type should be valid.
API Constraints
The user should have invoice creation permission.
Last updated