Admin Guides

Postman for DocBits

This guide will show you how to make HTTP requests to your DocBits organization via Postman. It is easy to use and very useful for organization administrators.

Setup

First, download Postman to your system and sign in/register.

Now follow this step-by-step guide to learn how HTTP requests work in Postman.

Authorization

In Postman

Before you can create your HTTP requests, you need to enter your API key from DocBits to authorize them.

 

  • Click on the `Authorization` tab und choose `API Key` as authorization type.
  • Fill in the values. Enter “X-API-key” in the `Key` field and your API Key as value (found in DocBits Settings menu under Integration) Select Add to `Header`.

 

  • It should look like this:

On DocBits API

Available at https://api.polydocs.io

  • Click on Authorize in the upper right corner
  • Enter your API Key and confirm by clicking `Authorize`

Create a new Workspace in Postman

  • Click on Workspaces and create a new workspace (you can name it whatever you want
  • You have to select the visibility which determines who can access this workspace.
  • After making your selection and clicking `Create Workspace` select Collections on the left side of the application and create a new collection for your HTTP requests by clicking `+`.
In this collection, you can add multiple HTTP requests. To do this, click on the 3 points of the collection and select `Add request`.

"GET" Method example

The GET method is very useful for getting information about users, sub-organizations, processed documents, and much more.

  • Choose the GET method in your HTTP request.
  • Authorize yourself as described above.
  • Open https://api.polydocs.io and add the path of the function behind the Polydocs URL. For example:
  • Now paste this link in the text box next to the GET method in Postman.

Click `Send` and you should receive all the information about every user in your organization.

"POST" Method examples

The POST method is usually used to create users or organizations, for example. This method inserts information into the database.

Create User

  • Select the POST Method.
  • Authorize yourself as described above
  • Open https://api.polydocs.io and add the path of the function behind the Polydocs URL. In this case:
  • Now paste this link into the text box next to the POST method in Postman.
  • Select the `Body` tab in your HTTP request and enter the keys and the values ​​for each credential that has a red asterisk next to its name.

When you’re done, it should look like this:
If you want to create an admin account, set the `is_admin` value to true.
 
Finally, click `Send` and you can see all the credentials you set in the response below. This means the user has been created.

Upload Document

You can also use the POST method to upload a document to DocBits.

  • Select the POST Method.
  • Authorize yourself as described above.
  • Open https://api.polydocs.io and add the path of the function behind the Polydocs URL. 

In this case:

  • Now paste this link into the text box next to the POST method in Postman.
  • Select the `Body` tab in your HTTP request and choose `form-data`
Enter file into the `KEY` field where you will find the hidden File dropdown. Select `File` and move to the `VALUE` field where you are able to select your file by clicking `Select Files`.
When you click `Send`, you should see “success”: true in the response.

It should look like this:

"DELETE" Method example

The DELETE method is used to delete, for example, users, organizations and so on.

  • Select the DELETE Method
  • Authorize yourself as described above.
  • Open https://api.polydocs.io and add the path of the function behind the Polydocs URL.
 
For example:
  • Now paste this link in the text box next to the DELETE method in Postman.
  • Replace the {user_id} at the end of the URL with the actual user ID you want to delete. (You can get the user_id using the GET method).
  • If you included the user_id in the URL, you don’t need to add a body key and value for it.
  • When you click `Send`, you should see “success”: true in the response.
 
It should look like this:

"PUT" Method example

The PUT method is mainly used to update user or organization data. It is very easy to understand and use.

  • Select the PUT Method.
  • Authorize yourself as described above.
  • Open https://api.polydocs.io and add the path of the function behind the Polydocs URL.
 
For example:
  • Now paste this link in the text box next to the PUT method in Postman.
  • Replace the {user_id} at the end of the URL with the actual user ID you want to delete. (You can get the user_id using the GET method).

Change Email Address of a User

  • In the body, enter “email” as the key and the new email address as the value.
  • Then just press `Send` and you should see “success” in the response.
Table of Contents