Getting Started Flow
Documentation for submission processing in Ping Vision
Below describes the flow of API calls that should be made in order to process a submission and retrieve results using the Ping.Vision API.
1. Create submission
The first call to create the submission and trigger processing should be made to the Initiate Submsission API. Upon making a successful
request, Ping Vision will begin automated processing on any files uploaded. The response will contain an id
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. In order to this you will need
to use the submission id
to make an API call to the List Recent Submission Activity API and appending the id
as a query parameter (ie https://vision.pingintel.com/api/v1/submission?id=<id>&fields=all
).
This will return a response of all the necessary information for evaluating its status including workflow_status_name
, jobs
, and automated_processing_failed
keys. Use the automated_processing_failed
to determine if 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 you can use the documents
key from the response in step 2.
The documents
key will contain a list of document objects associated with the submission. Use the document objects document_type
attribute to determine which you would like to download. For each document you choose to download
you can make a call to the document objects url
attribute which leverages the Download Submission Document API.