POST api/Hotel

Request Information

URI Parameters

None.

Body Parameters

HotelViewModel
NameDescriptionTypeAdditional information
Id

integer

None.

Name

string

Required

Address

string

None.

PhoneNo

string

Required

Description

string

None.

Image

string

None.

WardId

integer

None.

LocalLevelId

integer

None.

Latitude

decimal number

None.

Longitude

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Name": "sample string 2",
  "Address": "sample string 3",
  "PhoneNo": "sample string 4",
  "Description": "sample string 5",
  "Image": "sample string 6",
  "WardId": 1,
  "LocalLevelId": 7,
  "Latitude": 1.0,
  "Longitude": 1.0
}

text/xml

Sample:
<HotelViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MeroPalikaApi.Models">
  <Address>sample string 3</Address>
  <Description>sample string 5</Description>
  <Id>1</Id>
  <Image>sample string 6</Image>
  <Latitude>1</Latitude>
  <LocalLevelId>7</LocalLevelId>
  <Longitude>1</Longitude>
  <Name>sample string 2</Name>
  <PhoneNo>sample string 4</PhoneNo>
  <WardId>1</WardId>
</HotelViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HotelViewModel
NameDescriptionTypeAdditional information
Id

integer

None.

Name

string

Required

Address

string

None.

PhoneNo

string

Required

Description

string

None.

Image

string

None.

WardId

integer

None.

LocalLevelId

integer

None.

Latitude

decimal number

None.

Longitude

decimal number

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Name": "sample string 2",
  "Address": "sample string 3",
  "PhoneNo": "sample string 4",
  "Description": "sample string 5",
  "Image": "sample string 6",
  "WardId": 1,
  "LocalLevelId": 7,
  "Latitude": 1.0,
  "Longitude": 1.0
}

text/xml

Sample:
<HotelViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MeroPalikaApi.Models">
  <Address>sample string 3</Address>
  <Description>sample string 5</Description>
  <Id>1</Id>
  <Image>sample string 6</Image>
  <Latitude>1</Latitude>
  <LocalLevelId>7</LocalLevelId>
  <Longitude>1</Longitude>
  <Name>sample string 2</Name>
  <PhoneNo>sample string 4</PhoneNo>
  <WardId>1</WardId>
</HotelViewModel>