Results 1 to 3 of 3

 

Thread: Problem in Booking api of Expedia

  1. #1

    Status
    Offline
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Hello

    i m a web developer and try to integrate expedia on my site.. everything working fine.. except booking api.. please have a look

    https://book.api.ean.com/ean-services/rs/hotel/v3/res?
    minorRev=4&cid=55505&apiKey=5q4gzx43g6ukcrq798z2hz 75&customerSessionId=0ABAA82F-5C62-1913-1512-A05386902C52&locale=en_US&currencyCode=USD&hotelId =106347&arrivalDate=07/25/2011&departureDate=07/25/2011&supplierType=E&rateKey=ab20d08f-831a-4d64-9b71-9d71ae1b75c5&roomTypeCode=198058&rateCode=484072&c hargeableRate=231.18
    &room1=2,5,7&room1FirstName=test&room1LastName=tes ters&room1BedTypeId=23&room1SmokingPreference=NS
    &email=nishantg04@gmail.com&firstName=tester&lastN ame=testing
    &homePhone=2145370159&workPhone=2145370159&creditC ardType=CA&creditCardNumber=5401999999999999&credi tCardIdentifier=123&creditCardExpirationMonth=11&c reditCardExpirationYear=2012&address1=travelnow&ci ty=Bellevue
    &stateProvinceCode=WA&countryCode=US&postalCode=98 004

    when i directly run on my browser.. it gives an error.. no xml data found.. same with the xml generate on XML sandbox.. please help me..

    thanks

    Regards
    Nishant

  2. #2
    Registered User

    Status
    Offline
    Join Date
    May 2010
    Posts
    44
    Thanks
    0
    Thanked 7 Times in 7 Posts
    Are you trying to book a hotel reservation through the api?

    Just looking at the api documentation briefly, as I have no experience with it but I would say it's not working because your request is using name-value pairs instead of the xml as defined:

    developer_dot_ean_dot_com/docs/read/hotels/hotels_200631/resources/make_reservation#xml

    HTML Code:
    https://book.api.ean.com/external/xmlinterface.jsp?cid=xxx&resType=hotel200631&intfc=ws&xml=<ReservationRequest method="createNewHotelReservation">
    	<hotelId>122147</hotelId>
    	<arrivalDate>04/16/2011</arrivalDate>
    	<departureDate>04/18/2011</departureDate>
    	<supplierType>H</supplierType>
    	<propertyType>H</propertyType>
    	<RoomGroup>
    		<Room>
    			<numberOfAdults>2</numberOfAdults>
    			<firstName>test</firstName>
    			<lastName>testt</lastName>
    			<bedType>15</bedType>
    			<numberOfBeds>1</numberOfBeds>
    			<smokingPreference>NS</smokingPreference>
    			<specialInformation>test</specialInformation>
    		</Room>
    	</RoomGroup>
    	<customerIPAddress>172.16.82.13</customerIPAddress>
    	<roomTypeCode>481</roomTypeCode>
    	<roomTypeDescription>Standard 1 Queen</roomTypeDescription>
    	<rateCode>481</rateCode>
    	<rateDescription>Standard 1 Queen</rateDescription>
    	<hrnQuoteKey>17A82B173704084695</hrnQuoteKey>
    	<guarantee>C</guarantee>
    	<cancellationPolicy>We understand that sometimes plans fall through. 
    We do not charge a change or cancel fee. However, this property %28The 
    Boston Park Plaza Hotel %26amp%3B Towers%29 imposes the following 
    penalty to its customers that we are required to pass on: Cancellations or 
    changes made after 4:00 PM %28Eastern Daylight Time %28US %26amp%3B 
    Canada%29%29 on Apr 13, 2010 are subject to a 100%25 Cost of Stay penalty. 
    The property makes no refunds for no shows or early checkouts.</cancellationPolicy>
    	<RateInfo>
    		<displayRoomRate>666.55</displayRoomRate>
    		<chargeableRoomRateTaxesAndFees>98.55</chargeableRoomRateTaxesAndFees>
    		<chargeableRoomRateTotal>666.55</chargeableRoomRateTotal>
    		<displayNightlyRates>199.0,369.0</displayNightlyRates>
    		<displayCurrencyCode>USD</displayCurrencyCode>
    		<nativeRoomRate>666.55</nativeRoomRate>
    		<nativeNightlyRates>199.0,369.0</nativeNightlyRates>
    		<nativeCurrencyCode>USD</nativeCurrencyCode>
    		<rateFrequency>B</rateFrequency>
    	</RateInfo>
    	<ReservationInfo>
    		<email>customer@yourDomain.com</email>
    		<firstName>test</firstName>
    		<lastName>test</lastName>
    		<homePhone>4178291392</homePhone>
    		<workPhone>4178291392</workPhone>
    		<creditCardType>VI</creditCardType>
    		<creditCardNumber>5401999999999999</creditCardNumber>
    		<creditCardExpirationMonth>04</creditCardExpirationMonth>
    		<creditCardExpirationYear>2012</creditCardExpirationYear>
    		<creditCardIdentifier>123</creditCardIdentifier>
    	</ReservationInfo>
    	<AddressInfo>
    		<address1>travelnow</address1>
    		<city>springfield</city>
    		<stateProvince>MO</stateProvince>
    		<country>US</country>
    		<postalCode>65807</postalCode>
    	</AddressInfo>
    </ReservationRequest>

  3. #3

    Status
    Offline
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by michaeldim View Post
    Are you trying to book a hotel reservation through the api?

    Just looking at the api documentation briefly, as I have no experience with it but I would say it's not working because your request is using name-value pairs instead of the xml as defined:

    developer_dot_ean_dot_com/docs/read/hotels/hotels_200631/resources/make_reservation#xml

    HTML Code:
    https://book.api.ean.com/external/xmlinterface.jsp?cid=xxx&resType=hotel200631&intfc=ws&xml=<ReservationRequest method="createNewHotelReservation">
    	<hotelId>122147</hotelId>
    	<arrivalDate>04/16/2011</arrivalDate>
    	<departureDate>04/18/2011</departureDate>
    	<supplierType>H</supplierType>
    	<propertyType>H</propertyType>
    	<RoomGroup>
    		<Room>
    			<numberOfAdults>2</numberOfAdults>
    			<firstName>test</firstName>
    			<lastName>testt</lastName>
    			<bedType>15</bedType>
    			<numberOfBeds>1</numberOfBeds>
    			<smokingPreference>NS</smokingPreference>
    			<specialInformation>test</specialInformation>
    		</Room>
    	</RoomGroup>
    	<customerIPAddress>172.16.82.13</customerIPAddress>
    	<roomTypeCode>481</roomTypeCode>
    	<roomTypeDescription>Standard 1 Queen</roomTypeDescription>
    	<rateCode>481</rateCode>
    	<rateDescription>Standard 1 Queen</rateDescription>
    	<hrnQuoteKey>17A82B173704084695</hrnQuoteKey>
    	<guarantee>C</guarantee>
    	<cancellationPolicy>We understand that sometimes plans fall through. 
    We do not charge a change or cancel fee. However, this property %28The 
    Boston Park Plaza Hotel %26amp%3B Towers%29 imposes the following 
    penalty to its customers that we are required to pass on: Cancellations or 
    changes made after 4:00 PM %28Eastern Daylight Time %28US %26amp%3B 
    Canada%29%29 on Apr 13, 2010 are subject to a 100%25 Cost of Stay penalty. 
    The property makes no refunds for no shows or early checkouts.</cancellationPolicy>
    	<RateInfo>
    		<displayRoomRate>666.55</displayRoomRate>
    		<chargeableRoomRateTaxesAndFees>98.55</chargeableRoomRateTaxesAndFees>
    		<chargeableRoomRateTotal>666.55</chargeableRoomRateTotal>
    		<displayNightlyRates>199.0,369.0</displayNightlyRates>
    		<displayCurrencyCode>USD</displayCurrencyCode>
    		<nativeRoomRate>666.55</nativeRoomRate>
    		<nativeNightlyRates>199.0,369.0</nativeNightlyRates>
    		<nativeCurrencyCode>USD</nativeCurrencyCode>
    		<rateFrequency>B</rateFrequency>
    	</RateInfo>
    	<ReservationInfo>
    		<email>customer@yourDomain.com</email>
    		<firstName>test</firstName>
    		<lastName>test</lastName>
    		<homePhone>4178291392</homePhone>
    		<workPhone>4178291392</workPhone>
    		<creditCardType>VI</creditCardType>
    		<creditCardNumber>5401999999999999</creditCardNumber>
    		<creditCardExpirationMonth>04</creditCardExpirationMonth>
    		<creditCardExpirationYear>2012</creditCardExpirationYear>
    		<creditCardIdentifier>123</creditCardIdentifier>
    	</ReservationInfo>
    	<AddressInfo>
    		<address1>travelnow</address1>
    		<city>springfield</city>
    		<stateProvince>MO</stateProvince>
    		<country>US</country>
    		<postalCode>65807</postalCode>
    	</AddressInfo>
    </ReservationRequest>
    You can send request through xml also.. but if you want output in Json than you have to pass parameter as name value..

    EAN - REST Reservation

    look over this example..



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2