Create Ingestion Activity

Request Method

POST

Request URL

{{BASE_URL}}/ingestion/elt/createActivity

Request Headers

Parameter
Data Type
Field Validations
Description

x-cleartax-auth-token

String

NA

Mandatory. Access token linked to the workspace and environment.

Content-Type

String

NA

Mandatory. application/json

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

fileInfo

Object

-

Mandatory. One or more template nodes.

metadata

Object

NA

Optional. Leave this empty {}.

activityFlow

String

NA

Mandatory. This should be “FULL”.

Template Node Object

Parameter
Data Type
Field Validations
Description

{{template_name}}

Array

Enum: Based on solution clarification discussion

Mandatory. Array of one or more file nodes belonging to the same template.

File Node Object

Parameter
Data Type
Field Validations
Description

s3FileUrl

String

NA

Mandatory. Pre-signed URL where the file is uploaded (without the signature).

userFileName

String

NA

Mandatory. Name of the file uploaded. This will be visible to the end user.

Response Status Codes

HTTP Status Code
Description

200

OK

400

Bad request

401

Unauthorised

403

Forbidden

Response Schema

Parameter
Data Type
Field Validations
Description

activityId

String

NA

Ingestion activity ID that can be used to check status later.

state

String

NA

Initial state will be “EXECUTION_STARTED”

Sample Request and Response

Sample Request

curl --location 'https://api-sandbox.clear.in/ingestion/elt/createActivity' \
--header 'x-cleartax-auth-token: ' \
--header 'Content-Type: application/json' \
--data '{
    "fileInfo": {
        "INVOICE": [
            {
                "s3FileUrl": "https://storage.clear.in/v1/ap-south-1/ingestionv2-staging//ADVANCE_INGESTION/2024/FEBRUARY/a3ecec32-6b85-4fdf-b9ce-8bbbd9fef93f/OriginalFileName/a3ecec32-6b85-4fdf-b9ce-8bbbd9fef93f__1707128619263.xlsx",
                "userFileName": "report.xlsx"
            }
        ]
    },
    "metadata": {},
    "activityFlow": "FULL"
}'

Sample Response

{
    "activityId": "d244866c-998c-4646-8942-a650d7ab600c",
    "state": "EXECUTION_STARTED"
}

API Validations

Currently there are no known validations.

API Constraints

If more than one file is uploaded, then all of them will be processed as one batch. If there is any error, all of them might fail.

Last updated