In Heron, files are grouped together into submissions (also called end users). A submission represents data relating to an entity in your workflow, such as an applicant business, plaintiff, etc.
This guide will walk you using the Heron API to:
Creating a new submission requires sending a POST request to the /end_users
endpoint.
The request body should include the end_user_id
of the submission which should be a unique reference to the submission in your system. You may also include a name
field to give the submission a human-readable name.
Now we’ve created a new submission to hold our files, we can upload files to it and start extracting data from them.
To upload a file to a submission, send a POST request to the /end_users/{heron_id}/files
endpoint, providing a base64-encoded file, the file class, and the filename. The file class may be omitted, in which case Heron will classify the file based on its contents.
Now we’ve uploaded a file, we can poll the /end_users/{end_user_id_or_heron_id}/files
endpoint to retrieve the parsed data from files in the submission.
The response body will be an array of files in the submission, and will contain a parsed_results
array for each file. This array will contain the extracted data from the file and and a parsing_status
field indicating the status of the parsing process, you should continue to poll this endpoint until the parsing status is either succeeded
or failed
.
In Heron, files are grouped together into submissions (also called end users). A submission represents data relating to an entity in your workflow, such as an applicant business, plaintiff, etc.
This guide will walk you using the Heron API to:
Creating a new submission requires sending a POST request to the /end_users
endpoint.
The request body should include the end_user_id
of the submission which should be a unique reference to the submission in your system. You may also include a name
field to give the submission a human-readable name.
Now we’ve created a new submission to hold our files, we can upload files to it and start extracting data from them.
To upload a file to a submission, send a POST request to the /end_users/{heron_id}/files
endpoint, providing a base64-encoded file, the file class, and the filename. The file class may be omitted, in which case Heron will classify the file based on its contents.
Now we’ve uploaded a file, we can poll the /end_users/{end_user_id_or_heron_id}/files
endpoint to retrieve the parsed data from files in the submission.
The response body will be an array of files in the submission, and will contain a parsed_results
array for each file. This array will contain the extracted data from the file and and a parsing_status
field indicating the status of the parsing process, you should continue to poll this endpoint until the parsing status is either succeeded
or failed
.