Get Pre-signed URL

Request Method

GET

Request URL

{{BASE_URL}}/ingestion/elt/url/pre-sign

Request Headers

Parameter
Data Type
Field Validations
Description

x-cleartax-product

String

NA

Mandatory. This will be “GST”.

x-workspace-id

String

NA

Mandatory. Workspace ID.

x-cleartax-orgunit

String

NA

Mandatory. Organization Unit ID.

x-cleartax-auth-token

String

NA

Mandatory. Access token linked to the workspace and environment.

filecontenttype

String

Valid mime type

Mandatory. Content Type of the File to be uploaded. Eg: For Excel file, use “application/vnd.ms-excel”

Request Path Params

There will be no path parameters body for this API.

Request Query Params

Parameter
Data Type
Field Validations
Description

file_name

String

NA

Mandatory. Name of the file to be uploaded.

Request Body

There will be no request body for this API.

Response Status Codes

HTTP Status Code
Description

200

OK

400

Bad request

401

Unauthorised

403

Forbidden

Response Schema

Parameter
Data Type
Field Validations
Description

status

String

NA

If success, this will be “OK”

payload

String

NA

Pre-signed URL to be used in the next API.

Sample Request and Response

Sample Request

curl --location 'https://api-sandbox.clear.in/ingestion/elt/url/pre-sign?file_name=report.xlsx' \
--header 'filecontenttype: application/vnd.ms-excel' \
--header 'x-cleartax-product: GST' \
--header 'x-workspace-id: ' \
--header 'x-cleartax-orgunit: ' \
--header 'x-cleartax-auth-token: ' \
--data ''

Sample Response

{
    "status": "OK",
    "payload": "https://storage.clear.in/v1/ap-south-1/ingestionv2-staging//ADVANCE_INGESTION/2024/FEBRUARY/46e7b2e2-ff4e-4446-bb8f-74cf24c63074/OriginalFileName/46e7b2e2-ff4e-4446-bb8f-74cf24c63074__1707129770988.xlsx?X-Amz-Security-Token=IQoJb3JpZ2luX2VjENr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCmFwLXNvdXRoLTEiSDBGAiEA4K7aIxuPKKAYH%2BHa2nGWlWpFAOxzJCOMscw5C8wgSK4CIQDgk%2Fg7RuzgGVQ4O6rKozFPz7hc9jHNwBJbRQ5yja2v1SqLBQij%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAYaDDIxOTM0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H59Kp5MxdEWS41ThFFEhsme20ytDiF6A28e2eA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240205T104250Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=36000&X-Amz-Credential=ASIATGEOL5AHYCWHQ6W7%2F20240205%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Signature=a5e1cd9d3a0886a8865c8c1805ef5ada0a559920995f14c746f0d1f9da21b5ff"
}

API Validations

  1. Filename cannot be empty.

  2. Template type should be valid.

API Constraints

Once a pre-signed URL is generated, it will be valid for only 10 mins.

Last updated