Customer Login
PURPOSE
The Customer Login API allows the clients to login into their application. All the other APIs are dependent on successful customer login as the cookie generated after the successful login needs to be passed in every other API to validate the session. It is an authentication method to validate the client and extend the full arsenal of trading APIs and other historical data based on the valid credentials. This version of login requires to pass Client ID, password and My2PIN in encrypted format which clients use to login into the IIFL trading terminal.
Request Method: POST
Request format: JSON
Request Header:
Content-Type: application/json
Ocp-Apim-Subscription-Key:
to be provided after registration
REQUEST BODY
HEADER
Field Name | Description | Data Type (max length) |
Validation | Sample Value |
---|---|---|---|---|
appName | App Name provided at the time of registration | String | Cannot be empty. | IIFLMarDEMO |
appVer | Developer App Version | String | Cannot be empty. | 1.0 |
key | UserKey generated at the time of registration | String | Cannot be empty. | ABpyyGUh1nsbesSlup3VKURkI4tQDe8y |
osName | Channel of order | String | Cannot be empty. | WEB, Android, iOS |
request Code | Request Code of the API called | String | Cannot be empty. | IIFLMarRQLoginRequestV2 |
userId | User ID generated at the time of registration | String | Cannot be empty. | ZkhghN5uKj |
password | Password generated at the time of registration | String | Cannot be empty. | lfjnfS7rHGj |
BODY
Field Name | Description | Data Type (max length) |
Validation | Sample Value |
---|---|---|---|---|
ClientCode | Enter the client code provided by IIFL during registration | String(24) | Cannot be empty. Should be encrypted | rgeFQE7LZZIDBiSLFnWNNw== |
Password | Password Respective ClientCode | String(24) | Cannot be empty. Should be encrypted | +PMtfej7whK6g0HsvdF53Q= |
LocalIP | Local IP of the login requestor system | String | - | 123.123.12.12 |
PublicIP | Public IP of the login requestor system | String | - | 123.123.12.12 |
HDSerialNumber | Hard Disk Serial number of the Login requestor system. | String | - | |
MACAddress | MACAddress of the Login requestor system. | String | - | |
MachineID | Machine ID of the Login requestor system | String | - | MC1234.local.machine.com |
VersionNo | The version no of the app | String | Cannot be empty | 1.0.16.0 |
RequestNo | 1 | Int | Cannot be empty | First request for the day would be 1. Incremental request can be increased. |
My2PIN | Provide Date of Birth in YYYYMMDD format. E.g 19881226 | String | Cannot Be Empty. Should be encrypted | YAftqUV3rrXnbuCkD9Z+LA== |
ConnectionType | Should always be set to 1 | String | Cannot Be Empty | 1 |
REQUEST:
{
"head": {
"appName": "IIFLMarDEMO",
"appVer": "1.0",
"key": "ABpyyGUh1nsbesSlup3VKURkI4tQDe8y",
"osName": "Android",
"requestCode": "IIFLMarRQLoginRequestV2",
"userId": "mocZueK622W",
"password": "UjR1ElLwSzr"
},
"body": {
"ClientCode": "Q3lvmiEws2VgAbBOqEew==",
"Password": "Zk4whjdnQz2b12URF7zg==",
"LocalIP": "123.123.123.123",
"PublicIP": "123.123.123.12",
"HDSerialNumber": "",
"MACAddress": "",
"MachineID": "",
"VersionNo": "1.0.16.0",
"RequestNo": 1,
"My2PIN": "xk0gmy36O4AOr77fVcBzxQ==",
"ConnectionType": "1"
}
}
RESPONSE BODY
HEADER
Field Name | Description | Data Type (max length) |
List of Values | Sample Value |
---|---|---|---|---|
responseCode | This is the response code of API | String | - | IIFLMarRQLoginForVendor |
status | This is the response code of API | String | 0 2 |
0 |
statusDescription | This is the response code of API | String | 0 - Success 2 - Invalid head parameters |
Success |
responseCode | This is the response code of API | String | - | IIFLMarRQLoginForVendor |
BODY
Field Name | Description | Data Type (max length) |
Sample Value |
---|---|---|---|
Success | Message Type | String | "Invalid head parameters." "Invalid Body Parameters." “Success” “Error while processing your request.” |
Status | 0= Password change success full. Other 0 will point rejection | Int32 | -1 = Exception 0 = success 1=No Record Found 2- Invalid Input/ head parameters |
ServerDt | Server Date | Date | - |
LastLogin | Last Login Detail | String | |
TCPBcastLocalIP | TCP Broad Cast Local IP Details | String | 123.123.12.12 |
TCPBcastPublicIP | TCP BroadCast Port | UInt16 | 25002 |
UDPBcastIP | UDP Broadcast IP details. | String | 123.123.12.12 |
UDPBCastPort | UDP Broadcast Port. | UInt16 | 25002 |
InteractiveLocalIP | Interactive LocalIP details. | String | 123.123.12.12 |
InteractivePublicIP | Interactive public P details. | String | 123.123.12.12 |
InteractivePort | InteractivePort details. | UInt16 | 12345 |
ClientType | Client Type Details | UInt16 | 1 |
Message | Message Type | String | "Invalid head parameters." "Invalid Body Parameters." “Success” “Error while processing your request.” |
LastPasswordModify | Last Password Modified Details. | DateTime | /Date(1551422548000+0530)/ |
LastAccessedTime | Last Accessed Details. | DateTime | /Date(1551422548000+0530)/ |
LastAccessedTime | Last Accessed Details | DateTime | /Date(1519693794000+0530)/ |
CleareDt | - | Date | /Date(1554348600000+0530)/ |
VersionChanged | Application Version Change Details | Byte | 0 1 |
IsPLMDefined | PLM Defined details | Byte | 0 1 |
IsPLM | PLM Bind status. | Byte | 0 1 |
IsIDBound | - | Byte | 0 1 |
PLMsAllowed | PLMs Allowed count | Byte | 0 1 |
BulkOrderAllowed | Bulk Order facility allowed or not for the customer. | Byte | 0 1 |
RunningAuthorization | - | Byte | 0 1 |
OTPCredentialID | - | String | |
ClientName | Client Name | String | S0002 |
EmailId | Email ID | String | iifl123@gmail.com |
PasswordChangeFlag | Password Change Flag | Integer | 0 1 |
PasswordChangeMessage | Password Change Massage | String | |
PasswordChangeMessage | Password Change Massage | String | |
IsExternal | This is system generated | String | Y N |
DPID | This is system generated | String | 1234567812345678 |
POAStatus | Whether POA is signed for the client or not | String | Y N |
Success Response
{
"head": {
"responseCode": "IIFLMarRQLoginRequestV2",
"status": "0",
"statusDescription": "Success"
},
"body": {
"BulkOrderAllowed": 0,
"CleareDt": "/Date(1557804600000+0530)/",
"ClientName": "s0002 ",
"ClientType": 1,
"DPID": "1234567812345678",
"EmailId": "",
"InteractiveLocalIP": "123.123.123.123",
"InteractivePort": 10116,
"InteractivePublicIP": "123.123.123.12",
"IsExternal": "N",
"IsIDBound": 1,
"IsIDBound2": 0,
"IsPLM": 1,
"IsPLMDefined": 2,
"LastAccessedTime": "/Date(1557834036000+0530)/",
"LastLogin": "",
"LastPasswordModify": "/Date(1557136823000+0530)/",
"Msg": "",
"OTPCredentialID": "",
"PLMsAllowed": 1,
"POAStatus": "N",
"PasswordChangeFlag": 0,
"PasswordChangeMessage": "",
"RunningAuthorization": 1,
"ServerDt": "/Date(1557834282194+0530)/",
"Success": 0,
"TCPBCastPort": 25002,
"TCPBcastLocalIP": "",
"TCPBcastPublicIP": "",
"UDPBCastPort": 25002,
"UDPBcastIP": "224.5.6.21",
"VersionChanged": 0
}
}