Invoice scanning flow with human validation

The steps above compute at the backend of the server. However, users can combine the backend and frontend operations to perform these tasks. The flow to do so is stated as follows.

Step 1: Register and/or log in using the UI

  • POST Registration
  • POST Login

Step 2: Create or get the group id and queue id. This can be done using the steps mentioned above or using the UI. In the UI when a document is opened, its URL consists of the Queue id and Document ID.

  • POST Create Group
  • POST Create Queue
  • GET Get Group List GET
  • Get Queues By Group

Step 3: Upload the document.

  • POST Upload Multiple Documents
  • POST Scan [DOCTYPE]

Step 4: Go to the UI and make the desired changes.

Step 5: Extract the document using the same steps.

  • POST Export Document By ID
  • POST Extract [DOCTYPE]

Invoice scanning flow with human validation only for exceptions

Users can upload a document and scan it entirely using the API, but it can be a tedious task making all the minute custom corrections to the document. This process can be eased using the UI. A user can upload their document using the API and update the changes in the UI. Once it is updated, the user will receive a notification in the email stating the state of the document following which they can carry out other operations of their choice. The flow to do so is stated as follows.

Step 1: Register and/or log in using the UI

  • POST Registration
  • POST Login

Step 2: Create or get the group id and queue id. This can be done using the steps mentioned above or using the UI. In the UI when a document is opened, its URL consists of the Queue id and Document ID.

  • POST Create Group
  • POST Create Queue
  • GET Get Group List
  • GET Get Queues By Group

Step 3: Upload the document.

  • POST Upload Multiple Documents
  • POST Scan [DOCTYPE]

Step 4: Go to the UI and make the desired changes. Once the changes are final, an email will be sent indicating the state of the document. This will notify the user to perform other operations.

Step 5: Extract the document using the same steps.

  • POST Export Document By ID
  • POST Extract [DOCTYPE]

Scanning (custom model) flow

Staple has a feature that allows users to customize the scanning of a particular type of document. This is done using models. A model is a template designed by the user to extract specific information from documents. Using API and UI a user can make a model fits their requirements.

1. Login: Login to the account to be used by the user. This generates the JWT tokens which are used for validation and authentication.

  • POST Login

2. Create a model: A model can be created using API or using the UI. The API endpoint corresponding to creating a model is “Create Model”. The user has to fill the “Api key” and “Authorization key” in the headers. The request body will contain the model name and language.

  • POST Create Model

Request:

Untitled

Response:

Untitled

3. Upload Docs using UI: This step is to be performed on the UI. After uploading the document, the user has to set the fields to be matched. Thus, a template will be created.

4. Create or update a queue using a custom model: This step can be performed on the UI only. The model type of the queue has to be “Custom model” and the document type has to be the desired model.

5. Upload Documents: Once the queue is ready, users have to upload their documents. This can be done via UI or API. Users can then carry out their desired operations.

Previous:

Next:

Next:

Previous:

Want to know more?