POST Accounts/Login
Login Page validate Method for redirecting user to Home page Required values are login details
Request Information
URI Parameters
None.
Body Parameters
LoginViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| UserName | string |
Required |
|
| Password | string |
Required |
Request Formats
application/json, text/json
{
"UserName": "admin",
"Password": "123456"
}
application/xml, text/xml
<LoginViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ThreeStar.Common.Models"> <Password>123456</Password> <UserName>admin</UserName> </LoginViewModel>
Response Information
Resource Description
If user validated successfully then redirect to home page otherwise error return message on login view
UserViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| UserID | integer |
None. |
|
| FirstName | string |
Required String length: inclusive between 0 and 50 |
|
| LastName | string |
Required String length: inclusive between 0 and 50 |
|
| UserName | string |
Required String length: inclusive between 0 and 20 |
|
| Password | string |
Required Data type: Password String length: inclusive between 6 and 20 |
|
| ConfirmPassword | string |
Required Data type: Password String length: inclusive between 6 and 20 |
|
| string |
Required Matching regular expression pattern: ^[A-Za-z0-9_\+-]+(\.[A-Za-z0-9_\+-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.([A-Za-z]{2,4})$ String length: inclusive between 0 and 250 |
||
| Phone | string |
Required |
|
| Role_ID | integer |
Required |
|
| Role | string |
None. |
|
| SelectRole | Collection of Object |
None. |
|
| UserTypeId | integer |
Required |
|
| UserType | string |
None. |
|
| SelectUserType | Collection of Object |
None. |
|
| CompanyId | integer |
None. |
|
| CompanyName | string |
None. |
|
| SelectCompanyList | Collection of Object |
None. |
|
| strCompanyIds | string |
None. |
|
| CompanyIds | Collection of integer |
Required |
|
| lstCompanyDetails | Collection of CompanyViewModel |
None. |
|
| LocationId | integer |
None. |
|
| Location | string |
None. |
|
| LocationList | Collection of Object |
None. |
|
| strLocationIds | string |
None. |
|
| LocationIds | Collection of integer |
Required |
|
| IsActive | boolean |
None. |
|
| IsCurrentAdminUser | boolean |
None. |
|
| Active | string |
None. |
|
| ModuleName | CommonMessagesViewModel |
None. |
|
| IsAdminUser | boolean |
None. |
|
| IListUser | Collection of UserViewModel |
None. |
|
| TeamLeaderId | integer |
None. |
|
| ListUserLocation | Collection of UserLocationViewModel |
None. |
|
| ListUserCompany | Collection of UserCompanyViewModel |
None. |
|
| Success | boolean |
None. |
|
| Message | string |
None. |
Response Formats
application/json, text/json
{
"UserID": 0,
"FirstName": "Test",
"LastName": "User",
"UserName": "testuser",
"Password": null,
"ConfirmPassword": null,
"Email": "test@gmail.com",
"Phone": "8462626692",
"Role_ID": 2,
"Role": "PickUp Boy",
"SelectRole": null,
"UserTypeId": null,
"UserType": null,
"SelectUserType": null,
"CompanyId": 3,
"CompanyName": "TestCompany",
"SelectCompanyList": null,
"strCompanyIds": null,
"CompanyIds": null,
"lstCompanyDetails": null,
"LocationId": 3,
"Location": "Ahmedabad",
"LocationList": null,
"strLocationIds": null,
"LocationIds": null,
"IsActive": true,
"IsCurrentAdminUser": false,
"Active": "Active",
"ModuleName": null,
"IsAdminUser": false,
"IListUser": null,
"TeamLeaderId": null,
"ListUserLocation": null,
"ListUserCompany": null,
"Success": true,
"Message": "you are not authorized user."
}
application/xml, text/xml
<UserViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ThreeStar.Common.Models"> <Message>you are not authorized user.</Message> <Success>true</Success> <Active>Active</Active> <CompanyId>3</CompanyId> <CompanyIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" /> <CompanyName>TestCompany</CompanyName> <ConfirmPassword i:nil="true" /> <Email>test@gmail.com</Email> <FirstName>Test</FirstName> <IListUser i:nil="true" /> <IsActive>true</IsActive> <IsAdminUser>false</IsAdminUser> <IsCurrentAdminUser>false</IsCurrentAdminUser> <LastName>User</LastName> <ListUserCompany i:nil="true" /> <ListUserLocation i:nil="true" /> <Location>Ahmedabad</Location> <LocationId>3</LocationId> <LocationIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" /> <LocationList xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Web.Mvc" i:nil="true" /> <ModuleName i:nil="true" /> <Password i:nil="true" /> <Phone>8462626692</Phone> <Role>PickUp Boy</Role> <Role_ID>2</Role_ID> <SelectCompanyList xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Web.Mvc" i:nil="true" /> <SelectRole xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Web.Mvc" i:nil="true" /> <SelectUserType xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Web.Mvc" i:nil="true" /> <TeamLeaderId i:nil="true" /> <UserID>0</UserID> <UserName>testuser</UserName> <UserType i:nil="true" /> <UserTypeId i:nil="true" /> <lstCompanyDetails i:nil="true" /> <strCompanyIds i:nil="true" /> <strLocationIds i:nil="true" /> </UserViewModel>