2012-03-30 53 views
2

進出口尋找預訂與Expedia的API酒店Expedia的API book.api.ean.com空白

https://book.api.ean.com/

但是URL始終是空白,

細節在這裏使用REST/JSON

http://developer.ean.com/docs/hotels/version_3/book_reservation/

我見過幾個人遇到同樣的問題,並想知道,如果有人知道它是什麼

https://book.api.ean.com/ean-services/rs/hotel/v3/res?cid=55505 & apiKey = XXX &語言環境= EN_US & CURRENCYCODE = USD & customerUserAgent = Mozilla的/ 5.0(Windows NT的6.1)爲AppleWebKit/535.11(KHTML,例如Gecko)鉻/ 17.0.963.83 Safari瀏覽器/ 535.11 & customerIpAddress = 127.0.0.1 & ROOM1 = 1,3 & room1FirstName = TestBooking & room1LastName = TestBooking & room1BedTypeId = 13 & room1SmokingPreference = NS &房間2 = 1,5- & room2FirstName = TestBooking & room2LastName = TestBooking & room2BedTypeId = 13 & room2SmokingPreference = NS &電子郵件= XXX &的firstName = TestBooking &的lastName = TestBooking & HOMEPHONE = TestBooking & workPhone = TestBooking & CREDITCARDTYPE = CA & creditCardNumber = 5401999999999999 & creditCardIdentifier = 123 & creditCardExpirationMonth = 11 & creditCardExpirationYear = 2012 &地址1 =的Travel &城市=貝爾維尤 & stateProvinceCode = WA & COUNTRYCODE = US & POSTALCODE = 98004 & customerSessionId = 0ABAA871-3127-A913-6642-A1F86D902E2B & hotelId = 211540 & arrivalDate = 12/10/2012年 & departureDate = 12/12/2012年 & supplierType = E & rateKey = d03a8d29-1df2-4436-81d6-6b37eb4dcb78 & roomTypeCode = 352749 & rateCode = 1279169 & chargeableRate = 803。04

包括或不包括minorrev似乎並沒有太大的差別

+0

我相信在url中發佈的cc信息是測試數據... – 2012-03-30 18:51:59

+0

是Mike其api測試卡信息:) – 2012-03-30 19:00:24

+0

您是否在構造這些url查詢參數以傳遞給訂閱網址? – 2012-03-30 19:03:18

回答

2

嘗試URL編碼每個查詢參數:

customerUserAgent=Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11 

arrivalDate=12/10/2012 

的customerUserAgent網址PARAM應該URL編碼:

customerUserAgent=Mozilla%2F5.0%20(Windows%20NT%206.1)%20AppleWebKit%2F535.11%20(KHTML%2C%20like%20Gecko)%20Chrome%2F17.0.963.83%20Safari%2F535.11 

arrivalDate=12%2F10%2F2012 

查看PHP的urlencode瞭解更多信息。

此外,一定要刪除每個查詢字符串參數之間的空格,不知道它是否複製/粘貼問題。

+0

謝謝邁克,生病了試試:) – 2012-03-30 21:51:24

+0

你有沒有得到它的工作? – 2012-04-02 23:31:31

+0

是的,謝謝你絕對幫我到那裏,這是一些錯誤的東西,包括使用GET而不是POST和你的解決方案,謝謝 – 2012-04-05 04:48:47