POST Hotel/Booking

Request Information

URI Parameters

None.

Body Parameters

HotelBookingRequest
NameDescriptionTypeAdditional information
paxPassport

string

None.

countryID

string

None.

cityID

string

None.

checkOutDate

date

None.

checkInDate

date

None.

roomRequest

Collection of HotelRoomRequestModel

None.

internalCode

string

None.

hotelID

string

None.

breakfast

string

None.

roomID

string

None.

requestDescription

string

None.

guestTitle

string

None.

guestFirstName

string

None.

guestLastName

string

None.

guestPhone

string

None.

guestEmail

string

None.

userID

user API

string

None.

accessToken

access code getting from login

string

None.

Request Formats

application/json, text/json

Sample:
{
  "paxPassport": "sample string 1",
  "countryID": "sample string 2",
  "cityID": "sample string 3",
  "checkOutDate": "2021-11-27T06:09:28.2533449+07:00",
  "checkInDate": "2021-11-27T06:09:28.2533449+07:00",
  "roomRequest": [
    {
      "roomType": 0,
      "isRequestChildBed": true,
      "childNum": 2,
      "childAges": [
        1,
        2
      ]
    },
    {
      "roomType": 0,
      "isRequestChildBed": true,
      "childNum": 2,
      "childAges": [
        1,
        2
      ]
    }
  ],
  "internalCode": "sample string 6",
  "hotelID": "sample string 7",
  "breakfast": "sample string 8",
  "roomID": "sample string 9",
  "requestDescription": "sample string 10",
  "guestTitle": "sample string 11",
  "guestFirstName": "sample string 12",
  "guestLastName": "sample string 13",
  "guestPhone": "sample string 14",
  "guestEmail": "sample string 15",
  "userID": "sample string 16",
  "accessToken": "sample string 17"
}

application/xml, text/xml

Sample:
<HotelBookingRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models">
  <accessToken>sample string 17</accessToken>
  <userID>sample string 16</userID>
  <breakfast>sample string 8</breakfast>
  <checkInDate>2021-11-27T06:09:28.2533449+07:00</checkInDate>
  <checkOutDate>2021-11-27T06:09:28.2533449+07:00</checkOutDate>
  <cityID>sample string 3</cityID>
  <countryID>sample string 2</countryID>
  <guestEmail>sample string 15</guestEmail>
  <guestFirstName>sample string 12</guestFirstName>
  <guestLastName>sample string 13</guestLastName>
  <guestPhone>sample string 14</guestPhone>
  <guestTitle>sample string 11</guestTitle>
  <hotelID>sample string 7</hotelID>
  <internalCode>sample string 6</internalCode>
  <paxPassport>sample string 1</paxPassport>
  <requestDescription>sample string 10</requestDescription>
  <roomID>sample string 9</roomID>
  <roomRequest>
    <HotelRoomRequestModel>
      <childAges xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </childAges>
      <childNum>2</childNum>
      <isRequestChildBed>true</isRequestChildBed>
      <roomType>Single</roomType>
    </HotelRoomRequestModel>
    <HotelRoomRequestModel>
      <childAges xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </childAges>
      <childNum>2</childNum>
      <isRequestChildBed>true</isRequestChildBed>
      <roomType>Single</roomType>
    </HotelRoomRequestModel>
  </roomRequest>
</HotelBookingRequest>

Response Information

Resource Description

HotelBookingResponse
NameDescriptionTypeAdditional information
roomRequest

Collection of HotelRoomRequestModel

None.

paxPassport

string

None.

countryID

string

None.

cityID

string

None.

checkOutDate

date

None.

checkInDate

date

None.

internalCode

string

None.

hotelID

string

None.

breakfast

string

None.

roomID

string

None.

requestDescription

string

None.

bookingDate

date

None.

reservationNo

string

None.

osRefNo

string

None.

voucherNo

string

None.

agentOsRef

string

None.

hotelName

string

None.

hotelAddress

string

None.

roomName

string

None.

roomNum

integer

None.

bookingStatus

string

None.

totalPrice

decimal number

None.

issuedTimeLimit

date

None.

respTime

describe time in sending response

date

None.

userID

user ID to access API

string

None.

accessToken

access token that needed to access API

string

None.

status

SUCCESS or FAILED

string

None.

respMessage

detail message of response status

string

None.

Response Formats

application/json, text/json

Sample:
{
  "roomRequest": [
    {
      "roomType": 0,
      "isRequestChildBed": true,
      "childNum": 2,
      "childAges": [
        1,
        2
      ]
    },
    {
      "roomType": 0,
      "isRequestChildBed": true,
      "childNum": 2,
      "childAges": [
        1,
        2
      ]
    }
  ],
  "paxPassport": "sample string 1",
  "countryID": "sample string 2",
  "cityID": "sample string 3",
  "checkOutDate": "2021-11-27T06:09:28.2533449+07:00",
  "checkInDate": "2021-11-27T06:09:28.2533449+07:00",
  "internalCode": "sample string 6",
  "hotelID": "sample string 7",
  "breakfast": "sample string 8",
  "roomID": "sample string 9",
  "requestDescription": "sample string 10",
  "bookingDate": "2021-11-27T06:09:28.2533449+07:00",
  "reservationNo": "sample string 12",
  "osRefNo": "sample string 13",
  "voucherNo": "sample string 14",
  "agentOsRef": "sample string 15",
  "hotelName": "sample string 16",
  "hotelAddress": "sample string 17",
  "roomName": "sample string 18",
  "roomNum": 19,
  "bookingStatus": "sample string 20",
  "totalPrice": 21.0,
  "issuedTimeLimit": "2021-11-27T06:09:28.2533449+07:00",
  "respTime": "2021-11-27T06:09:28.2533449+07:00",
  "userID": "sample string 23",
  "accessToken": "sample string 24",
  "status": "sample string 25",
  "respMessage": "sample string 26"
}

application/xml, text/xml

Sample:
<HotelBookingResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models">
  <accessToken>sample string 24</accessToken>
  <respMessage>sample string 26</respMessage>
  <respTime>2021-11-27T06:09:28.2533449+07:00</respTime>
  <status>sample string 25</status>
  <userID>sample string 23</userID>
  <agentOsRef>sample string 15</agentOsRef>
  <bookingDate>2021-11-27T06:09:28.2533449+07:00</bookingDate>
  <bookingStatus>sample string 20</bookingStatus>
  <breakfast>sample string 8</breakfast>
  <checkInDate>2021-11-27T06:09:28.2533449+07:00</checkInDate>
  <checkOutDate>2021-11-27T06:09:28.2533449+07:00</checkOutDate>
  <cityID>sample string 3</cityID>
  <countryID>sample string 2</countryID>
  <hotelAddress>sample string 17</hotelAddress>
  <hotelID>sample string 7</hotelID>
  <hotelName>sample string 16</hotelName>
  <internalCode>sample string 6</internalCode>
  <issuedTimeLimit>2021-11-27T06:09:28.2533449+07:00</issuedTimeLimit>
  <osRefNo>sample string 13</osRefNo>
  <paxPassport>sample string 1</paxPassport>
  <requestDescription>sample string 10</requestDescription>
  <reservationNo>sample string 12</reservationNo>
  <roomID>sample string 9</roomID>
  <roomName>sample string 18</roomName>
  <roomNum>19</roomNum>
  <totalPrice>21</totalPrice>
  <voucherNo>sample string 14</voucherNo>
  <roomRequest>
    <HotelRoomRequestModel>
      <childAges xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </childAges>
      <childNum>2</childNum>
      <isRequestChildBed>true</isRequestChildBed>
      <roomType>Single</roomType>
    </HotelRoomRequestModel>
    <HotelRoomRequestModel>
      <childAges xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </childAges>
      <childNum>2</childNum>
      <isRequestChildBed>true</isRequestChildBed>
      <roomType>Single</roomType>
    </HotelRoomRequestModel>
  </roomRequest>
</HotelBookingResponse>