Introduction
Objective
This document enables IQ reseller customers to leverage the IQ reseller API functionality by using access token.
Scope
This document describes the API workflow, creating a new API user and access the API Key. Using the API key, customer application can create a “session” to interact with the IQ reseller API. Once all the activity is complete, it can then end the session.
Technology compatibility
Any REST capable development language can easily call the APIs and start processing the returned data
API Workflow
To use the APIs and obtain valid information, the following steps needs to be executed in the sequence:
Add API User
Add API user for each application that requires integration. It is suggested to use the name of the application that will use the Key as the name for the API user.
Getting API Key
Once API user is added, a Key is made available and the admin user should obtain the key to be used by their respective application.
Generate Session Token
Use your program of choice that can make REST API calls.
Pass API Key as APIToken in body of https://signin.iqreseller.com/api/IntegrationAPI/Session . You will get Data in response of above API which is nothing but Session Token.
Calling IQ Reseller APIs using Session Token
The above API returns Session Token in response which will be used as iqr-session-token in header key of other APIs in order to authenticate request in IQ Reseller API’s.
Creating API User in IQ Reseller
To use the IQ reseller API, you must first log into the IQ reseller portal (https://signin.iqreseller.com) with administrative rights.
Click on the Add API User button to add the API user
A pop-up form will show up to input the Service Name and the Email. Type in the information that will align close to the application that will use this API access. The API Key is pre-populated and displayed with the ability to copy the key to clip board. User can close the box by clicking cancel button.
On clicking save the API user will be added to the user’s grid for the tenant.
Managing API User and Getting API Key
On successfully adding an API User to the Tenant, the user will be displayed in the viewing grid along with all the other tenant users.
The column is API User and is Admin User will distinctly display the user roles. The Actions will vary based on whether the user is a tenant user or an API user.
For an API user the View link will show a read only pop-up displaying the user information.
The API Key can be copied from the View API User Information display by clicking on the Clipboard next to the text field.
A filter on the viewing grid will allow the user to choose whether to display all the users, the tenant users or just the API users. On selecting the radio button for All Users, the viewing grid is as displayed:
On selecting the radio button for showing only the Tenant Users, the display grid changes to
And lastly if we select the radio button to display only the API users, the viewing grid changes to
Generating Session Token
The following API base calls are required to access IQ reseller API to establish Session and access various methods exposed by the IQ reseller API.
URL: https://signin.iqreseller.com/api/IntegrationAPI/Session
HTTP METHOD
POST
REQUEST HEADERS
Content-Type | application/json |
Content-Encoding | UTF8 |
Accept**** | application/json |
REQUEST PAYLOAD
Payload is the APIToken obtained as API Key after creating API user in IQ Reseller Portal.
RESPONSE PAYLOAD
Response is the Session Token passed as API Response json with Data element.
RESPONSE CODE
2XX | Success (recommended 200) |
401 | Authorization Error (Unauthorized) |
404 | Not found |
500 | Critical Server Error |
Calling IQ Reseller API using Session Token
Once Session Token is generated it will be used as iqr-session-token in header key of other APIs in order to authenticate request in other IQ Reseller APIs.
To get list of all IQ Reseller API visit to https://postman.iqreseller.com. Consider example of fetching CVs of IQ Reseller Application use below API.
URL: https://api.iqreseller.com/webapi.svc/CV/json/GetCVs.
HTTP METHOD
POST
REQUEST HEADERS
Content-Type | application/json |
Content-Encoding | UTF8 |
Accept**** | application/json |
iqr-session-token | Session Token obtained above |
RESPONSE PAYLOAD
Response the Json Result of CVs
RESPONSE CODE
2XX | Success (recommended 200) |
401 | Authorization Error (Unauthorized) |
404 | Not found |
500 | Critical Server Error |
End Session
Once the IQ reseller API functionality is all complete, proceed with ending the session by calling the Session API with DELETE verb. Session Token obtained as “Data” in Post call is used as the value for the bearer token.
URL: https://signin.iqreseller.com/api/IntegrationAPI/Session
HTTP METHOD
DELETE
REQUEST HEADERS
Content-Type | application/json |
Content-Encoding | UTF8 |
Authorization | Bearer Token |
REQUEST PAYLOAD
No request payload is accepted
RESPONSE PAYLOAD
No response payload is provided
RESPONSE CODE
2XX | Success (recommended 200) |
401 | Authorization Error (Unauthorized) |
404 | Not found |
500 | Critical Server Error |