Posted on 13th September 2012No Responses
.Net code for hotel search request to Travelport

public void SearchHotelAvailability(Uri uri, string userName, string password, string targetBranch) {

            HotelSearchAvailabilityReq request = new HotelSearchAvailabilityReq();
            request.BillingPointOfSaleInfo = new BillingPointOfSaleInfo();
            request.BillingPointOfSaleInfo.OriginApplication = “UAPI”;

            HotelLocation location = new HotelLocation();
            location.Location = “PDX”; //”YVR”, BOB, LOX, DEN
            location.LocationType = typeHotelLocation.City;
            request.HotelLocation = location;

            HotelSearchModifiers searchModifiers = new HotelSearchModifiers();

            searchModifiers.NumberOfAdults = 2;
            searchModifiers.NumberOfRooms = 1;
            searchModifiers.MaxProperties = 20;
            request.HotelSearchModifiers = searchModifiers;

            HotelStay stay = new HotelStay();
            DateTime checkinDate = DateTime.Parse(“2012-09-17”);
            stay.CheckinDate = checkinDate;
            stay.CheckoutDate = DateTime.Parse(“2012-09-18”);
            request.HotelStay = stay;

            HotelSearchServiceBinding binding = new HotelSearchServiceBinding();

            binding.Url = uri.ToString();
            binding.Credentials = new NetworkCredential(userName, password);
            request.TargetBranch = targetBranch;
                HotelSearchAvailabilityRsp response = binding.service(request);
            catch (Exception ex)


 Some useful ref materials:

Leave a Response
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  This Wordpress Theme is protected. Thanks to 1 Hour Loan