Using the UI with the API

Use of the API is relatively easy, however, a small amount of knowledge about how to interact with Restful APIs is required.

API use is not required, however, it can be utilised to automate parts of the processing workflow.

A basic method to start using the APIs for invoices, or any of Staple’s “off the shelf” models is as follows:

  1. The user uses the “Login” API endpoint to retrieve a user token and API key using their credentials.
  2. The user then makes a queue (which can be done in the interface as described previously or using the Queues API endpoint.
Documentation on the API, available at “https://www.documentation.staple.io”_**
Documentation on the API, available at “https://www.documentation.staple.io”

  1. Using the endpoint “scan [type] documents”, the user posts a document, using the QID of the queue created.
  2. Documents are then processed. For documents where all data is extracted - the information is returned directly.
  3. In cases where not all data is extracted, the document is sent to the UI.
  4. In both cases (complete successful scan or not, a DocID is returned to the user).
  5. The user can view these documents in the “Receive Queue”.
  6. Clicking on the document allows the viewing of the Processed image. And edits or corrections can be made. To save corrections, click the “Complete” button.
  7. At a later time, the user can call the document “Get Document” endpoint using the desired DocID. This returns the updated information in this document from the user interface, or if the document was rejected by underwriting (this is the “continuous calling” flow described in previous documentation).

Should the user want to create a model themselves, and then access the model via API, this is also supported. The method for this is as follows:

  1. The user first creates a model in the system using the Model Creation feature. This model is now immediately available to the user as a “Custom Model” in both the interface and via the API.
  2. The user uses the “Login” API endpoint to retrieve a user token and API key using their credentials.
  3. The user then makes a queue (which can be done in the interface as described previously, or using the Queues API endpoint.
  4. Using the endpoint “POST - Upload Multiple Documents” endpoint, the user posts a document, using the QID of the queue created.
  5. Documents are then processed and the document is sent to the UI, and the DocID is returned to the user.
  6. If desired, the user can view these documents in the “Received Queue” in the user interface. Clicking on the document allows the viewing of the Processed image. And edits or corrections can be made. To save corrections, click the “Complete” button.
  7. At a later time, the user can call the document “Get Document” endpoint using the desired DocID. This returns the updated information in this document from the user interface, or if the document was rejected by underwriting

Previous:

Next:

Next:

Previous:

Want to know more?