Trigger File Ingestion
This API will trigger the ingestion to your Clear GST Account.
Request Method
POST
Request URL
Request Headers
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
x-cleartax-auth-token | String | NA | Mandatory. User auth token. |
Request Path Params
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
templateType | String | Enum: sales, purchase
| Type of document. sales - Sales document. purchase - Purchase document. |
Request Query Params
There are no query paramaters for this API.
Request Body
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
externalId | String | NA | Deprecated. This field can be ignored. |
userInputArgs | Object | NA | Mandatory. User Input Arguments Object |
fileInfo | Object | NA | Mandatory. File Information Object |
User Input Arguments Object
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
gstins | Array | NA | Optional. Array of GSTINs for which the file is uploaded. |
templateId | String | NA | Mandatory. Template ID of the file uploaded. For a sales document, the system template ID is "618a5623836651c01c1498ad". For a purchase document, the system template ID is "60e5613ff71f4a7aeca4336b". For custom upload templates, use the custom upload template ID. |
File Information Object
Parameter | Data Type | Field Validations | Discriptions |
---|---|---|---|
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
Response Status Codes
HTTP Status Code | Description |
---|---|
201 | Triggered ingestion successfully. |
400 | Bad request. |
401 | Unauthorized |
500 | Internal Server Error |
Response Schema
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
activityId | String | NA | Async activity ID created by Clear. |
externalId | String | NA | If the user passes this in the request, it will be returned in the response. |
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
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
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)
HTTP Status Code - 201 Created
Sample Response (Error)
HTTP Status Code - 401 Unauthorized
API Validations
Currently there are no known validations.
API Constraints
Currently there are no known constraints.
Last updated