EAN Insider Info: Our new Hotel API v3 9


With the recent release of our newest API, we wanted to get some inside scoop on what it is like to develop with our Hotel API v3 and open it up to our affiliates – so we asked an expert. Meet Imran Qureshi, a Technical Integration Manager here at EAN who knows a thing or two about our new API. Read on for his insight and inside info on what the new Hotel API is really like.

  • RESTful API – Speedy development
    • Having never programmed with the V3 Hotel API before I was extremely keen to get my hands on an early beta release of the V3 Hotel API and test drive its RESTful interface and features.  Glad to say, in a few days, I managed to develop a full working integration covering the 4 core API methods: getList to search hotels, getInformation to view specific hotel information, getAvailability to see available hotel rooms and getReservation to book a room. With the core application development complete, all that was left was to polish and improve the overall User Interface and workflow experience – something I assumed would be easy but in fact proved to be a far more labour intensive task than developing against the core V3 Hotel API itself!
  • Comprehensive Examples
    • The Developer Hub has a lot of great examples that are intuitive and easy to follow. All can be cut and paste for reuse if required. This proved to be really valuable in gaining momentum to develop (and troubleshoot) the V3 Hotel API.
  • True REST API
    • The V3 Hotel API accepts name/value pair requests. The result is a simple, lightweight query string request that is easy to construct and debug. Naturally smaller units of code would result in an overall more rapid, streamlined application.
  • JSON Response – Client Side Scripting
    • I prefer programming in JavaScript. My V3 Hotel API project was biased toward this, so I decided to develop a pure Client Side (cross-browser based) Javascript application for a user to search, view and book hotels. As the V3 Hotel API can return native JSON response objects, this meant I could parse all JSON Responses with ease.
  • XML Response
    • For affiliates that prefer to receive XML responses, like for Server Side integration as opposed to Client Side development, the Restful API can also return full XML.
  • Flexible API Interface Choice
    • Depending on your programming preference and integration requirements, you can choose to interface against the V3 Hotel API using either a RESTful or SOAP end point. Complex integrations typically rely on a combination of several API interfaces so as a developer you have the ability to choose what is optimal for your environment.
  • Ping Request
    • This new method is only available with the V3 Hotel API. It is useful in checking if the live API service is available and operational.
  • MaxRatePlanCount
    • This is handy request element that allows you to choose the number of available room types the API should return when you perform a hotel city search. By default, the API always returns 1 available room type. This can be increased to return more.

Imran’s development project utilized the following tools and technologies: Eclipse Framework, JavaScript, V3 Hotel Restful API, C#.NET (for Web Service Proxy), JQuery and JQuery UI.

Join the API discussion on LinkedIn or send questions directly to our team of API experts for assistance. You can also learn more about the new Hotel API or check out the full list of new features.

 


Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

9 thoughts on “EAN Insider Info: Our new Hotel API v3

  • Pramod Joshi

    Hi ,

    I am using new API version 3. while i am reading xml by my code the i got the error “Data at the root level is invalid. Line 1, position 1″. I am using c# code

    public static DataSet HotelRoomAvailabilityResultsNew()
    {
    DataSet ds1 = new DataSet();
    ds1 = loadxml(“http://api.ean.com/ean-services/rs/hotel/v3/avail?cid=55505&minorRev=1&apiKey=na9hxhvs5qxsq2kybavash8y&customerSessionId=0ABAA825-0BE2-8912-CF12-159D0D9032F8&customerUserAgent=Mozilla/4.0&customerIpAddress=122.180.137.202&locale=en_US&currencyCode=INR&xml=37406105/10/201105/12/2011true120travelnow”);
    return ds1;
    }

    public static DataSet loadxml(string xmlpath)
    {
    DataSet ds = new DataSet();
    ds.ReadXml(xmlpath);
    return ds;
    }

    Please suggest me ASAP

    Thank you
    Pramod Joshi

    • Abhishek Verma

      Hi,
      I am trying to integrate the IAN API in the application to get my demo travel site ready.
      But there is no source code available in the Expedia site to check and work as required.

      I also want an API for country city and code.
      please reply soon as for last two days i am struggling on various point to get the result on the site.

  • Ankit

    Hi,

    I am using the EAN hotel API and fetching the xml by this service

    “http://api.ean.com/ean-services/rs/hotel/v3/list?type=xml&cid=55505&minorRev=13&apiKey=29y4a6jjxu5sbmg3ymrxarm3&locale=en_US&currencyCode=INR&city=delhi&countryCode=IN”

    On any browser I am getting the correct result XML while when I am trying to use it via SAX parser its giving exception not well formed XML “Exception in thread “main” org.xml.sax.SAXParseException: Content is not allowed in prolog”

    I am also posting the code with it :

    public static void main(String[] args) throws Exception {
    String q = "http://www.google.com/ig/api?weather=delhi";
    String a = "http://api.ean.com/ean-services/rs/hotel/v3/list?type=xml&cid=55505&minorRev=13&apiKey=29y4a6jjxu5sbmg3ymrxarm3&locale=en_US&currencyCode=INR&city=delhi&countryCode=IN"
    ;
    URL url = new URL(a);
    SAXParserFactory spf = SAXParserFactory.newInstance();
    SAXParser sp = spf.newSAXParser();

    XMLReader xr = sp.getXMLReader();
    TestHandler handler = new TestHandler();
    xr.setContentHandler(handler);
    xr.parse(new InputSource(url.openStream()));
    }

    while using same above code for getting Google weather its working fine.

    Please help.

    Thanks,
    Ankit

  • Amit

    Hi

    I have implemented the V3 Expedia API.

    I need my own header and footer at my booking page. Presently when it goes to the booking page there is no header and footer but I need if someone can help me out. Please tell me the way to implement my own header and footer in my site.

    Early response would be greatly appreciated.

    Thanks