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.
43 stars 34 forks source link

Get possible values for origin and destination in LowFareSearchReq #141

Open evgenTraytyak opened 7 years ago

evgenTraytyak commented 7 years ago

How can I get the possible values for origin and destination in LowFareSearchReq? Because some IATA codes not valid for search (it raises an error Savon::SOAP::Fault - (Server.Business) -1 UNABLE TO PRICE AS SPECIFIED, :) For example: RKV - Reykjavík ZUD - Ancud (Chile)

evgenTraytyak commented 7 years ago
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://www.travelport.com/service/air_v38_0" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body>
<LowFareSearchReq TargetBranch="P******" xmlns="http://www.travelport.com/schema/air_v38_0">
<BillingPointOfSaleInfo xmlns="http://www.travelport.com/schema/common_v38_0" OriginApplication="uAPI"/>
<SearchAirLeg>
  <SearchOrigin>
    <CityOrAirport xmlns="http://www.travelport.com/schema/common_v38_0" Code="MSQ"/>
  </SearchOrigin>
  <SearchDestination>
    <CityOrAirport xmlns="http://www.travelport.com/schema/common_v38_0" Code="ZUD"/>
  </SearchDestination>
  <SearchDepTime PreferredTime="2016-11-08"/>
  <AirLegModifiers>
    <PreferredCabins>
      <CabinClass xmlns="http://www.travelport.com/schema/common_v38_0" Type="Economy"/>
    </PreferredCabins>
  </AirLegModifiers>
</SearchAirLeg><SearchAirLeg>
  <SearchOrigin>
    <CityOrAirport xmlns="http://www.travelport.com/schema/common_v38_0" Code="ZUD"/>
  </SearchOrigin>
  <SearchDestination>
    <CityOrAirport xmlns="http://www.travelport.com/schema/common_v38_0" Code="MSQ"/>
  </SearchDestination>
  <SearchDepTime PreferredTime="2016-11-13"/>
  <AirLegModifiers>
    <PreferredCabins>
      <CabinClass xmlns="http://www.travelport.com/schema/common_v38_0" Type="Economy"/>
    </PreferredCabins>
  </AirLegModifiers>
</SearchAirLeg><AirSearchModifiers>
  <PreferredProviders>
    <Provider xmlns="http://www.travelport.com/schema/common_v38_0" Code="1P"/>
  </PreferredProviders>
</AirSearchModifiers><SearchPassenger xmlns="http://www.travelport.com/schema/common_v38_0" Code="ADT"/></LowFareSearchReq></env:Body></env:Envelope>
vivekjyotipramanik commented 7 years ago

Hi evgenTraytyak,

We can use the ReferenceRetrieveDataRetrieveReq to get all the possible Airport codes. Please find below the sample request and endpoint. Please let me know how it goes. Thanks.


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <ReferenceDataRetrieveReq TraceId="doesntmatter-8176" AuthorizedBy="User" TargetBranch="TRGT_BRCH" TypeCode="Airport" xmlns="http://www.travelport.com/schema/util_v37_0">
         <BillingPointOfSaleInfo OriginApplication="UAPI" xmlns="http://www.travelport.com/schema/common_v37_0"/>
         <ReferenceDataSearchModifiers MaxResults="20000" ProviderCode="1V"/>
      </ReferenceDataRetrieveReq>
   </soapenv:Body>
</soapenv:Envelope>

Thanks & Regards Vivekjyoti Pramanik