Tag: sabre

A lot of people contacted me asking about how Sabre works, etc. So, I decided to post this here. The way it works is:

You sign up with Sabre for a web services account and you they will give you an IPCC, username and passwrord that you use for communicating with their web services.You will send over the username and password for only authentication request. However, you will use your IPCC in all the requests you make.

Your initial request should be a SessionCreate request. You will provide your username and password in it. Upon success, you will receive a binary token. You will use this token in all the subsequent requests you make.

Your subsequent requests will depend on what you want to do and the services you have access to. Sabre has multiple flight services that you can communicate with. You will need to contact them, explain your needs and ask what service will be best for you. LowFareSearch and BargainFinder are probably the ones that are most used.

After you are done selecting the flight, etc. You will send a request to AirBook (if I remember the name correctly) to book a flight. And, there’s other services you might want to use to pass passenger information, etc.

After you are done, you end the session with a call to SessionCloseRQ.

When you get an account with Sabre, you will be able to look at request and response formats for the for the web services over here: https://drc.sabre.com/oer/

Sabre is a company that has data of all flight schedules, etc. And, using their system, you can book flights, hotels, rent cars, etc.

Getting PHP to talk with Sabre

I tried PHP Soap and nuSoap. They both didn’t work for me because of their limitations. So I ended up writing a small script of my own that talks with Sabre for me after I realized that the headers being sent by all the SOAP libraries I tried, were not compatible with Sabre’s web services.

Sabre checks the “Content-Type” header in your request. If that is not “text/xml”, you will always get an error, even if your xml is correct.

Here’s a little piece of code that should help with the transport part. I will leave the generation of XML to you.