Travelport / travelport-uapi-tutorial

The travelport-uapi-tutorial is a Java project for Universal API that will help you connect and code a standard workflow including Air and Hotel.
45 stars 34 forks source link

How can we set the number of infants using low fare search? #78

Open jadchahine opened 8 years ago

jadchahine commented 8 years ago

Hi all,

Please check the below image concerning the Low Fare Search demo available on your travelport website https://demo.travelportuniversalapi.com/Home

lowfaresearch

It shows number of adults, children and infants parameters. If we take a look in the JAVA code we find classes that contains setNumberOfAdults() and setNumberOfChildren() methods so we can set the number of adults and childrens, but what about infants? how can I set infants number? Note that the children parameter is a class named NumberOfChildren that contains an age parameter and other parameters, My question is: does the code differs between children and infants according to the age value?

Thanks&Regards

vivekjyotipramanik commented 8 years ago

Hi Jad,

LowFareSearch and HotelSearch is completely different. In LowFareSearch we use PassengerTypeCode to identify the type of passenger. It can be ADT(Adult), CNN(Child), INF(infant), SNC(Senior citizens) etc. In LowFareSearch the code differs between CNN and INF according to Age value.

HotelSearch is completely different and there we can provide the passengerTypes differently.

Please find below the links with the details. Please let me know how it goes. Thanks.

Air:

https://support.travelport.com/webhelp/uapi/uAPI.htm#Air/Air_Pricing/Air_Pricing_with_Passenger_Types.htm%3FTocPath%3DAir%7CAir%2520Shopping%2520and%2520Booking%7CAir%2520Pricing%7CAir%2520Pricing%2520Modifiers%7C_____1

Hotel:

https://support.travelport.com/webhelp/uapi/uAPI.htm#Hotel/Hotel_Search/Hotel_Search_by_Number_of_Travellers.htm%3FTocPath%3DHotel%7CHotel%2520Shopping%2520and%2520Booking%7CHotel%2520Search%7CHotel%2520Search%2520Modifiers%7C_____9

Thanks & Regards Vivekjyoti Pramanik

Niks11 commented 8 years ago

hi vivek,

i can see the example on https://demo.travelportuniversalapi.com/Home but what is the code for that in php... i am using low fare search result example. How can i pass adult(s), child and infants value and get respective prices.... And i am getting Airline value in code... I need the full name of the Airline...

Thanks & Regards

vivekjyotipramanik commented 8 years ago

Hi Niks11,

Thank you for your interest in Travelport Universal API. To get the flightName and full name we have to use ReferenceDataRetrieveReq and it will provide all the flight names. Please find below the link with the details. Also, Demosite is not created using PHP, it is in c#. Please find below the PHP sample for the same. Please let me know how it goes. Thanks.

https://github.com/Travelport/travelport-uapi-tutorial-php/tree/master/Util

https://support.travelport.com/webhelp/uapi/uAPI.htm#Getting_Started/Design_Considerations/Reference_Data.htm%3FTocPath%3DGetting%2520Started%7CUniversal%2520API%2520Overview%7CDesign%2520Considerations%7C_____5

Thanks & Regards Vivekjyoti Pramanik