POST api/User
Request Information
URI Parameters
None.
Body Parameters
UserViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | integer |
None. |
|
| FirstName | string |
Required |
|
| MiddleName | string |
None. |
|
| LastName | string |
None. |
|
| PhoneNo | string |
Required Data type: PhoneNumber Matching regular expression pattern: ^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$ |
|
| string |
Required |
||
| StateId | integer |
Required |
|
| DistrictId | integer |
Required |
|
| LocalLevel | integer |
Required |
|
| Address | string |
Required |
|
| WardId | integer |
None. |
|
| Photo | string |
None. |
|
| StateName | string |
None. |
|
| DistrictName | string |
None. |
|
| LocalLevelName | string |
None. |
|
| Password | string |
Data type: Password String length: inclusive between 6 and 100 |
|
| ConfirmPassword | string |
Data type: Password |
|
| RoleName | string |
None. |
Request Formats
application/json, text/json
Sample:
{
"Id": 1,
"FirstName": "sample string 2",
"MiddleName": "sample string 3",
"LastName": "sample string 4",
"PhoneNo": "sample string 5",
"Email": "sample string 6",
"StateId": 7,
"DistrictId": 8,
"LocalLevel": 9,
"Address": "sample string 10",
"WardId": 1,
"Photo": "sample string 11",
"StateName": "sample string 12",
"DistrictName": "sample string 13",
"LocalLevelName": "sample string 14",
"Password": "sample string 15",
"ConfirmPassword": "sample string 16",
"RoleName": "sample string 17"
}
text/xml
Sample:
<UserViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MeroPalikaApi.Models"> <Address>sample string 10</Address> <ConfirmPassword>sample string 16</ConfirmPassword> <DistrictId>8</DistrictId> <DistrictName>sample string 13</DistrictName> <Email>sample string 6</Email> <FirstName>sample string 2</FirstName> <Id>1</Id> <LastName>sample string 4</LastName> <LocalLevel>9</LocalLevel> <LocalLevelName>sample string 14</LocalLevelName> <MiddleName>sample string 3</MiddleName> <Password>sample string 15</Password> <PhoneNo>sample string 5</PhoneNo> <Photo>sample string 11</Photo> <RoleName>sample string 17</RoleName> <StateId>7</StateId> <StateName>sample string 12</StateName> <WardId>1</WardId> </UserViewModel>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
UserViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | integer |
None. |
|
| FirstName | string |
Required |
|
| MiddleName | string |
None. |
|
| LastName | string |
None. |
|
| PhoneNo | string |
Required Data type: PhoneNumber Matching regular expression pattern: ^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$ |
|
| string |
Required |
||
| StateId | integer |
Required |
|
| DistrictId | integer |
Required |
|
| LocalLevel | integer |
Required |
|
| Address | string |
Required |
|
| WardId | integer |
None. |
|
| Photo | string |
None. |
|
| StateName | string |
None. |
|
| DistrictName | string |
None. |
|
| LocalLevelName | string |
None. |
|
| Password | string |
Data type: Password String length: inclusive between 6 and 100 |
|
| ConfirmPassword | string |
Data type: Password |
|
| RoleName | string |
None. |
Response Formats
application/json, text/json
Sample:
{
"Id": 1,
"FirstName": "sample string 2",
"MiddleName": "sample string 3",
"LastName": "sample string 4",
"PhoneNo": "sample string 5",
"Email": "sample string 6",
"StateId": 7,
"DistrictId": 8,
"LocalLevel": 9,
"Address": "sample string 10",
"WardId": 1,
"Photo": "sample string 11",
"StateName": "sample string 12",
"DistrictName": "sample string 13",
"LocalLevelName": "sample string 14",
"Password": "sample string 15",
"ConfirmPassword": "sample string 16",
"RoleName": "sample string 17"
}
text/xml
Sample:
<UserViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MeroPalikaApi.Models"> <Address>sample string 10</Address> <ConfirmPassword>sample string 16</ConfirmPassword> <DistrictId>8</DistrictId> <DistrictName>sample string 13</DistrictName> <Email>sample string 6</Email> <FirstName>sample string 2</FirstName> <Id>1</Id> <LastName>sample string 4</LastName> <LocalLevel>9</LocalLevel> <LocalLevelName>sample string 14</LocalLevelName> <MiddleName>sample string 3</MiddleName> <Password>sample string 15</Password> <PhoneNo>sample string 5</PhoneNo> <Photo>sample string 11</Photo> <RoleName>sample string 17</RoleName> <StateId>7</StateId> <StateName>sample string 12</StateName> <WardId>1</WardId> </UserViewModel>