Get File Ingestion Status

This API will be used to know the final status of the ingestion.

Request Method

GET

Request URL

{{BASE_URL}}/integration/v1/ingest/file/{{templateType}}/status/{{activityId}}?tenant={tenant}

Request Headers

ParameterData TypeField ValidationDescription

x-cleartax-auth-token

String

NA

Mandatory.

User auth token.

Request Path Params

ParameterData TypeField ValidationDescription

templateType

String

Enum:

sales,

purchase

Mandatory.

Type of document. sales - Sale document.

purchase - Purchase document.

activityId

String

NA

Mandatory. Activity ID received in Trigger File Ingestion API.

Request Query Params

ParameterData TypeField ValidationDescription

tenant

String

Enum:

GSTSALES,

MAXITC

Mandatory. Primary Product for which the file is uploaded.

GSTSALES - For Sales Document,

MAXITC- For Purchase Document

Request Body

There is no request body for this API.

Response Status Codes

HTTP Status CodeDescription

200

OK

400

Bad request.

401

Unauthorized

500

Internal Server Error

Response Schema

ParameterData TypeField ValidationsDescription

externalId

String

NA

If the user passes this in the request, it will be returned in the response.

activityId

String

NA

Activity ID requested in the request.

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.

processingStats

Array

NA

Array of Processing Stats objects. If the activity is not completed, then this field will be null.

fileError

Object

NA

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

Processing Stats Object

ParameterData TypeField ValidationsDescription

gstin

String

NA

GSTIN for which the stats are aggregated.

totalDocumentCount

Number

NA

Count of total documents parsed from the valid rows.

validRows

Number

NA

Count of valid rows.

invalidRows

Number

NA

Count of invalid rows.

File Error Object

ParameterData TypeField ValidationsDescription

inputFileName

String

NA

Filename used in Trigger File Ingestion API.

status

String

Enum: DATA_VALIDATION_ERROR

Status of the error file.

errorFileUrl

String

NA

URL from where the error file can be downloaded. This pre-signed URL is valid for 10 hours. This file will be in CSV format.

errors

String

NA

Array of File Error Details Object. If there are no errors, this will be null.

File Error Details Object

ParameterData TypeField ValidationsDescriptions

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.

errorResolution

String

NA

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

Sample Response (Success)

Success - HTTP Status Code - 200

{
    "externalId": null,
    "activityId": "3a23d3221b1847a78264f2e5fbb7e538",
    "status": "ACTIVITY_COMPLETED",
    "processingStats": [
        {
            "gstin": "27AAFCD5862R013",
            "totalDocumentCount": 1,
            "validRows": 0,
            "invalidRows": 1
        },
        {
            "gstin": "29AAFCD5862R000",
            "totalDocumentCount": 1,
            "validRows": 1,
            "invalidRows": 0
        },
        {
            "gstin": "24AAFCD5862R005",
            "totalDocumentCount": 1,
            "validRows": 1,
            "invalidRows": 0
        }
    ],
    "fileError": {
        "inputFileName": "SalesInvoicesAndCreditOrDebitNotes.xlsx",
        "status": "DATA_VALIDATION_ERROR",
        "errorFileUrl": "https://storage.clear.in/v1/ap-south-1/ingestionv2-staging/My%20Organis_SR_3a23d3221b1847a78264f2e5fbb7e538_2023-01-18T18%3A52%3A45.927215.xlsx?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEPr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCmFwLXNvdXRoLTEiRzBFAiEA7Bi1YiB7kUi1SG5aU2DfrjuKMeTmgVpJG9r3Sh6rl6YCIEYo3TadDA%2FTHxAyHCtG4j9XuL%2FQ22eWduVSi9xpSLWJKv8ECGQQBRoMMjE5MzQxOTA3OTgzIgzLG4YHegDJxQ1qDykq3AT2FHa%2BtXgQm2IwD%2F2NsRLltkBEp9%2Bf%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-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230118T185255Z&X-Amz-SignedHeaders=host&X-Amz-Expires=36000&X-Amz-Credential=ASIATGEOL5AH4GGGNYO7%2F20230118%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Signature=bec52c2fb85a98217bbb2b16e232a294deb811cba25b9cc1b50006abb4a5f21e",
        "errors": null
    }
}

Sample Response (Error)

HTTP Status Code - 401 Unauthorized

{
    "externalId": null,
    "activityId": null,
    "status": "UNPLANNED_ERROR",
    "processingStats": null,
    "fileError": null
}

API Validations

Currently there are no known validations.

API Constraints

Currently there are no known constraints.

Last updated