Testing with Postman

Test your document parsing API with Postman

Objective

In this article, we'll learn how to test a Mindee document parsing API using Postman, a popular developer tool.

Prerequisites

  1. You must have set up a custom document parsing API at https://platform.mindee.com. If you don’t have one ready, set up the demo API using the US tax form W-9 described in Build your document parsing API .

  2. For a better developer experience, we recommend that you train your API model with at least 20 documents (as done in the tutorial mentioned above).

  3. The Postman app running on your machine.

Step 1: Set up Postman

Assuming you already have a data model ready to go, you can test it right away with Postman (or any other tool that understands the OpenAPI v2 specification - fka Swagger v2.0).

To do so, head over the Documentation page of your Mindee API and select the download openapi.json link, as shown below:

14401440

If you didn't follow the tutorial, you can access the JSON file and continue along with the tutorial.

Next, open your Postman desktop client and import the json file using the Import menu:

14401440

Once you have uploaded your file to Postman, you should see the following confirmation screen:

12961296

Press the Import button. Your w-9 Postman collection shows up in Postman, as follows:

662662

Now, let’s generate an API key so we can test our API in Postman.

Step 2: Generate an API key

Head over the API Keys page of your API Dashboard and press the Create new API key button:

10001000

Enter the name of the application that will use your API key (such as “Postman”) and press the Create new API key button. A page similar to the following screenshot appears below:

10001000

Next, copy the API key to your clipboard by pressing the copy icon. Paste this key right away into a text file, we’ll need it in the next step.

Step 3: Configure Postman environment variables

Back in Postman, create an environment called W-9 and a variable called apiToken:

10001000

In the Initial Value column of the apiToken variable, paste the API key you generated in Step 2 and press the Add button.

Once you've added the environment, you can close the Manage Environments window. Now select the W-9s environment:

10001000

Congratulations! Your API is now properly configured in Postman.

In the next article, we’ll look at how you can use your API’s Predict endpoint.

 

Questions?
Slack Logo IconSlack Logo Icon  Join our Slack


Did this page help you?