Using Postman with the IRIS HR API
Although Postman is a third-party tool that we do not officially support, some businesses use it and have inquired about setting up the HR API.
This guide is one example of how to integrate the HR API, but there may be other ways to set this up.
We are unable to provide further support for using Postman with the HR API.
Setting Up Environments
If you have access to only one environment, you only need to do this once. However, if you have a practice system and/or access to a sandbox, you must create a separate environment for each.
To set up an Environment:
-
Select Environments.
-
On this tab, select the + (plus) icon next to the search box to add a new environment.
Name the environment and add the following variables:
-
baseUrl
-
ClientID
-
ClientSecret
-
AccessTokenURL
-
For the base URL, add: https://api.iris.co.uk/hr/v2/
-
For AccessTokenURL, add https://api.iris.co.uk/oauth2/v1/token
-
Finally, add the ClientID and ClientSecret that match the environment you are setting up.
-
Select Save in the top right-hand corner.
Importing API Schema
-
Select the Collections tab.
-
In the top-left corner, select Import (next to My Workspace) and enter the following URL:https://swagger.hrapi.co.uk/swaggerv2.json
-
A pop-up appears. Select the import. The API should appear under My Workspace.
Configuring Collection To Work With Environment
-
In the top-right corner, select the No Environment dropdown and choose the environment you created.
-
In the My Workspace section, select HR API. Several tabs show in the middle section.
-
Go to the Variables tab and remove the baseUrl entry.
-
Select Save in the top-right corner.
-
Select the Authorization tab and configure the following settings:
-
Auth Type: OAuth 2.0
-
Add auth data to: Request Headers
-
-
At the bottom of the screen, locate the Configure New Token section and enter a token name of your choice.
For this example, we will use ProductionToken.
-
The Access Token URL populates with a value, which you must replace with a variable from our Environment.
-
To do this, replace the existing text with {{AccessTokenURL}}.
-
Repeat this process for Client ID, enter {{ClientID}}. For Client Secret, enter {{ClientSecret}}.
-
Select Save at the top-right of the screen.
-
Select Get New Access Token.
If all credentials are correct, an Authentication complete message will appear.
-
On the same tab, in the middle, there is a section labelled: Current Token.
-
In this section, select the ProductionToken token. It should have a token populated and an expiry date listed.
-
Activate the Auto-fresh Token if it is not already activated.
-
-
You can now use the endpoints in Postman to make calls to the API and view the returned data.
Postman should now manage token access automatically, so you no longer need to refresh it manually.