1. Create Submission
The first call to create the submission and trigger processing should be made to the Initiate Submission API. Upon making a successful request, Ping Vision will begin automated processing on any files uploaded. The response will contain anid field, which will be used for the next step.
2. Polling For Results
In order to retrieve the processing status of the submission created in step 1, you will need to poll the submission to retrieve the results. To do this, you will need to use the submissionid to make an API call to the List Recent Submission Activity API, appending the id as a query parameter (for example, https://vision.pingintel.com/api/v1/submission?id=<id>&fields=all).
This call will return all necessary information for evaluating the submission status, including the workflow_status_name, jobs, and automated_processing_failed keys. Use the automated_processing_failed
key to determine whether the processing job has failed. Depending on the workflow, a successful response might look something like this:
3. Downloading Documents
Assuming a successful processing result was received from step 2, you can proceed to download the resulting output documents from the API. To do this, use thedocuments list object from the response in step 2.
The documents list contains document objects associated with the submission. Use each document object’s document_type attribute to determine which documents you would like to download.
For each document you choose to download, make a call to the document object’s url attribute, which leverages the Download Submission Document API.
Sample documents list object