How is this done?

Discussion in 'Programming' started by JEET, Jan 28, 2015.

  1. #1
    How is this done?

    This question is for any "air ticket booking", "hotel booking" etc website. India USA anywhere...

    An example site is www.makemytrip.com
    or http://www.yatra.com/?redirect=no&origin=US
    How do these websites find out which flight has seats available?
    How do these websites find out which hotels have rooms available?

    I think there must be some sort of API and if someone here knows about it, please post a link.
    Although these are big companies, and can afford a lot of man power, but I seriously doubt that the database is updated manually.
    Then how is it done?
     
    Solved! View solution.
    JEET, Jan 28, 2015 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    I highly doubt there is ONE API for all these sites - I'm assuming the use whatever API (if any) is available pr. airline's booking system, and if there is none available, maybe they scrape the website in real-time. It's not impossible, just takes a bit of coding, not to mention quite a bit of knowledge (the scraping, not necessarily the use of APIs, although some of them can be very sparsely documentet)
     
    PoPSiCLe, Jan 28, 2015 IP
  3. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #3
    You are right, there is not one single API for all airlines.
    I too think that there are separate APIs for each airlines, but where to find it. Is it available to just selected "paid" users?

    Also what about the hotels. Most hotels listed with these companies don't even have websites, let alone API. They are mostly small guesthouses with few exceptions ( 4 and 5 stars ).
    Then how do these websites find out which hotels have rooms available?
    This is too much work with manual labour.
     
    JEET, Jan 28, 2015 IP
  4. #4
    They might not have a website, but again, their systems might be online - if they have one. If not, maybe they provide the data off-hand - it's not very expensive to have someone in China or similar punch in a lot of number in an existing system.
     
    PoPSiCLe, Jan 29, 2015 IP
  5. Pudge1

    Pudge1 Well-Known Member

    Messages:
    912
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    Digital Goods:
    1
    #5
    http://www.aa.com/i18n/agency/General/aa_direct_connect.jsp
    There's one for American Airlines. You just have to Google API + airline companies name. Some won't have it so as PoPSiCLe said they would have to scrape them off the site. Which is a lot more work and more challenging but not at all impossible.

    I hope you're not trying to start one of these sites as there are already 100's of them and it would take quite a bit of work to make.
     
    Pudge1, Feb 1, 2015 IP
  6. ajf7688

    ajf7688 Active Member

    Messages:
    719
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    85
    #6
    Yatra/Makemytrip etc have exclusive tie ups with hotels and airlines who authorize them to use their APIs. Yatra etc have to work with several API integration points on their web application to consume services from the providers(airlines/hotels).
    In case there are no APIs, then email is used for correspondence and a support person will manually make the booking, An example flow would be.
    1. Customer books a room at 3 star hotel via example.com, since no API is present a message is shown to user saying "Confirmation pending"
    2. Example.com dispatches an email to 3 star hotel support staff
    3. Support staff checks availability of requested room in their system and makes/cancels the booking
    4. Support staff them informs example.com staff about the booking status
    5. example.com informs customer about booking and ask to make payment if confirmed or gives the customer an option to pay the hotel directly
    Each hotel will have a different flow based on Cancellation policy, payment terms

    The web application and API automation is just part of the operations, For smooth overall functioning there is still a lot of manual operations involved, Lot of service staff is required to keep integrity and maintain customer relationship. Lot of business relations/negotiations has to go on on between providers and the site officials.
     
    ajf7688, Feb 3, 2015 IP