Trigger File Ingestion

This API will trigger the ingestion to your Clear TDS Account.

Request Method

POST

Request URL

{{BASE_URL}}/ingestion/integration/v1/{templateType}/ingest/file

Request Headers

ParameterData TypeField ValidationsDescription

x-cleartax-auth-token

String

NA

Mandatory.

User auth token.

tan

String

NA

Mandatory. TAN of deductor

Content-Type

String

NA

Mandatory. application/json

Request Path Params

ParameterData TypeField ValidationsDescription

templateType

String

Enum: tds

Type of document. This will always be “tds”.

Request Query Params

There are no query paramaters for this API.

Request Body

ParameterData TypeField ValidationsDescription

userInputArgs

Object

NA

Mandatory.

User Input Arguments Object

fileInfo

Object

NA

Mandatory.

File Information Object

User Input Arguments Object

ParameterData TypeField ValidationsDescription

templateId

String

NA

Mandatory. Template ID of the file uploaded.

For 24Q - 62df9202813e5b2d2d2a2ff5 For 26Q - 62de5622813e5b2d2d2a2f90 For 27Q - 62df93ca813e5b2d2d2a2ff7 For 27EQ - 62df928a813e5b2d2d2a2ff6

For custom upload templates, use the custom upload template ID.

metadata

Object

NA

Mandatory.

Contains 3 fields, formtype, financialYear,

quarter

tenant

String

Enum:

For 24Q - TDSV224Q For 26Q - TDSV226Q For 27Q - TDSV227Q For 27EQ-TDSV227EQ

Mandatory.

Metadata Object

ParameterData TypeField ValidationsDescription

formType

String

Enum:

Form24Q

Form26Q

Form27Q

Form27EQ

Mandatory.

Type of the form.

financialYear

String

NA

Mandatory.

Financial Year

quarter

String

NA

Mandatory.

Quarter

File Information Object

ParameterData TypeField ValidationsDiscriptions

s3FileUrl

String

NA

Mandatory.

Presigned URL where the file was uploaded.

userFileName

String

NA

Mandatory.

Filename used when generating the Pre-signed URL.

Sample Request

Request Body

{
    "userInputArgs": {
        "templateId": "62de5622813e5b2d2d2a2f90",
        "metadata": {
            "formType": "Form26Q",
            "quarter": "Q4",
            "financialYear": "2022"
        },
        "tenant": "TDSV226Q"
    },
    "fileInfo": {
        "s3FileUrl": "https://storage.clear.in/v1/ap-south-1/ingestionv2-staging/307a6331-df8b-4bdd-a05a-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UWRStHASAnRHEFVikyWF5U5ue3tbM4Yo3sgwoXkKZyaVYP3PYQ5ymvvso2Im6BPL6sbaDaE5ReZM8ERVU45SHcunB%2BAbwHlhEYAUioTZEb7Guo%2FKTHTVLCSzCo6oeoBjqZAZm9cXMxdHI5EY8AotdCRL%2FMXCpiX9CXpXRLjE4C%2BMtirRzA8EV%2FE0kDJrGA0ncsvHelZ4WgPpNPIP3JMRNGh3yTvKrYcsi%2B9sLTsuIPSMAoHDW71snzhI0IOHBaKcy5EwS1GP7%2FMhqhCm2Ax%2Fdxa2jme%2FmnVO2JgxK%2FSiCVKXPjtwrZ1OdzYyyaA7IcExGZT6szIEiZoHeuCA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230913T174512Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=35999&X-Amz-Credential=ASIATGEOL5AHSMLMZPEM%2F20230913%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Signature=bdf6fa61008bb41e8b939920f3293f69cb710a92528ce7183d0d4a117bfc072b",
        "userFileName": "TDS-TEST.csv"
    }
}

Response Status Codes

HTTP Status CodeDescription

201

Triggered ingestion successfully.

400

Bad request.

401

Unauthorized

500

Internal Server Error

Response Schema

ParameterData TypeField ValidationsDescription

activityId

String

NA

Async activity ID created by Clear.

status

String

Enum: ACTIVITY_CREATED, ACTIVITY_QUEUED, ACTIVITY_COMPLETED, ACTIVITY_DISCARDED,

SYSTEM_FEEDBACK, UNPLANNED_ERROR

Status of the triggered ingestion activity. ACTIVITY_CREATED - Ingestion triggered,

ACTIVITY_QUEUED - Ingestion in progress,

ACTIVITY_COMPLETED - Ingestion completed or aborted or error,

ACTIVITY_DISCARDED - Ingestion deleted from UI.

SYSTEM_FEEDBACK - Any handled error on the file, eg: file corrupted, mandatory header missing, duplicate header, etc. UNPLANNED_ERROR - Any unhandled error.

For non activity related errors, this will be null.

errors

Array

NA

Array of Error Objects. If there are no errors, then this will be an empty array.

Error Object

ParameterData TypeField ValidationsDescription

errorCode

String

NA

Error code. If there is no error code, then this will be null.

errorMessage

String

NA

Error message. If there is no error message, then this will be null.

errorField

String

NA

Error field. If there is no error field, then this will be null.

errorValues

Array

NA

Array of strings. Error values. If there are no error values, then this will be null.

Sample Response (Success)

HTTP Status Code - 201 Created

{
    "activityId": "9dac682840244551958bc1c2f90d7710",
    "status": "ACTIVITY_CREATED",
    "errors": []
}

Sample Response (Error)

HTTP Status Code - 401 Unauthorized

{
    "activityId": null,
    "status": null,
    "errors": [
        {
            "errorMessage": "Invalid Auth Token",
            "errorField": null,
            "errorValues": null,
            "errorCode": "AUTHENTICATION_FAILED"
        }
    ]
}

API Validations

Currently there are no known validations.

API Constraints

Currently there are no known constraints.

Last updated