Authentication

A REST API that allows companies to login into IRIS TOPAZ.

Request Parameters

The input parameters that will be supported in the API request are as below:

  • Username (email): This is the email id of the user trying to authenticate with IRIS Topaz.
  • Password (password): This is the password of the user trying to authenticate with IRIS Topaz.
Response Parameters

The API will respond with an enveloped response. The response information is as below:

  • X-Auth-Token (token): An authentication token that needs to passed in all subsequent requests
  • Root Company ID (rootCompanyid): The unique ID that identifies and authorizes the user to post all subsequent requests.
Sample Request and Response

URL

https://esp.api.irisgst.com/login

Method

POST

Headers

Content-Type:application/json

Body

{

  "email":"prkamble@email.com",

  "password":"Abc@123"

 

}

Response

(SUCCESS)

{

    "status": "SUCCESS",

    "errorList": null,

    "message": null,

    "fieldErrors": null,

    "errors": null,

    "response": {

        "rootCompanyName": "EWB Business",

        "companyid": 1,

        "isValidPassword": true,

        "passWordExpiredDate": "2018-06-12",

        "companyname": "EWB Test Business",

        "rootCompanyid": "1",

        "email": "prkamble@email.com",

        "parentid": "0",

        "token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJwcmthbWJsZUBtYWlsaW5hdG9yLmNvbSlIjoid2ViIiwiY3JlYXRlZCI6MTUyMDIzOTAzMDAyNywiZXhwIjoxNTIwODQzCJ0ZW5hbnQiOiJkZXYifQ.YjfVVpdggSuKvx3iFJqz0xXWryaLo9y3d583k_Kdi5XWg-5k_3zEuyITBXyJPxMci381zKR464wDAF6AHbbA",

        "username": "prasad"

    }

}

Response

(FAILURE)

{

    "status": "FAILURE",

    "errorList": [

        {

            "type": "ERROR",

            "description": "Bad Credentials"

        }

    ],

    "message": "Bad Credentials",

    "fieldErrors": null,

    "errors": null,

    "response": null

}