Test your document parsing API with Postman
In this article, we'll learn how to test a Mindee document parsing API using Postman, a popular developer tool.
- You must have set up a custom document parsing API at https://beta.mindee.net. If you don’t have one ready, set up the Burger Stores demo API described in this tutorial.
- 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).
- 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:
If you followed the Burger Stores and Menus tutorial, you should now have downloaded a file named
Next, open your Postman desktop client and import the
burger_stores-openapi.json file using the Import menu:
Once you have uploaded your file to Postman, you should see the following confirmation screen:
Press the Import button. Your Burger and Menus Postman collection shows up in Postman, as follows:
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:
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:
Next, copy the API key to your clipboard by pressing the copy icon, as shown below:
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 Burger Stores and a variable called
In the Initial Value column of the
apiToken variable, paste the API key you generated in Step 2 and press the Add button.
Close the Manage Environments window and select the Burger Stores environment:
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.