Authentication
URL
userauthentication/auth
Method
POST
Request Media type
application/json
Response Media type
application/json
Request Parameters
| Parameter | Data Type | Min | Max | M/O | Sample Value | Comments |
|---|---|---|---|---|---|---|
| userid | String | M | TEST | This is the username provided to login to the API | ||
| password | String | M | password | This is the password provided to login to the API | ||
| imei | String | M | 352099001761481 | IMEI of the accessing device. | ||
| versionno | String | O | 1.0.0.0 | Version No | ||
| dbname | String | M | nalakath_cn | Database Name |
Response Values
| Name | Data Type | Min Length | Max Length | M/O | Sample Value | Comments |
|---|---|---|---|---|---|---|
| sessionid | String | M | QH7LlQ3wQMK9oYEKj | This key to be used for all API calls (256 bit) | ||
| loginuserrights | String | M | 2,3 | Coma separated list of feature IDs available for the user. Inventory(1) - Issue Indent(2),Issue Indent Approval(3),Purchase Requisition(4) Cost Centre Management(5) - Vehicle Trip Details(6),Equipment Trip Details(7),Generator Readings(8),Electricity Readings(9) | ||
| username | String | M | ADMIN-SCTPL | Name of the User that is Logged In | ||
| ucode | Integer | M | 1 | Logged In User’s Code | ||
| employeecode | Integer | M | 32472 | Employee Code of Login User |
Sample Request
{
"userid": "TEST",
"password": "password",
"imei": "352099001761481",
"versionno": "1.0.0.0",
"dbname": "nalakath_cn"
}
Sample Success Response
{
"sessionid": "QH7LlQ3wQMK9oYEKj",
"loginuserrights": "2,3",
"username": "ADMIN-SCTPL",
"ucode": "1",
"employeecode": "32472",
"e": 200,
"msg": "Success"
}
Sample Failure Responses
{
"e": 400,
"msg": "Bad Request."
}
{
"e": 401,
"msg": "Invalid authentication credentials."
}