9

I am currently using CURL in PHP to request XML. When using same flow in POSTMAN service I can get the success result but, when using CURL in PHP I get CODE - UC SEG STATUS NOT ALLOWED-0003 status. Below are my CURL request header and code. Is my header option in CURL request making the problem?

 function get_xml_response($xmldata) {
error_reporting(E_ALL);
$wsdl = 'https://sws3-crt.cert.sabre.com';

$header = array(
    "Content-type: text/xml;charset=\"utf-8\"",
    "Accept: text/xml",
    "Cache-Control: no-cache",
    "Pragma: no-cache",
    "SOAPAction: \"\"",
    "Content-length: " . strlen($xmldata),
);

$soap_do = curl_init();
curl_setopt($soap_do, CURLOPT_URL, "$wsdl");
curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true);
curl_setopt($soap_do, CURLOPT_FRESH_CONNECT, TRUE);
curl_setopt($soap_do, CURLOPT_TIMEOUT, 60); 
curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($soap_do, CURLOPT_POST, true);
curl_setopt($soap_do, CURLOPT_POSTFIELDS, $xmldata);
curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header);

  if (curl_exec($soap_do) === false) {
    $err = 'Curl error: ' . curl_error($soap_do);
    curl_close($soap_do);
    print $err;
    return false;
  } else {
    $response = curl_exec($soap_do);
    $httpcode = curl_getinfo($soap_do, CURLINFO_HTTP_CODE);
    return $response;
  }
}

EnhancedBookRQ.xml

    <?xml version="1.0" encoding="utf-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Header>
    <eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader">
      <eb:From>
        <eb:PartyId eb:type="urn:x12.org.IO5:01">info@gandakiintl.com</eb:PartyId>
      </eb:From>
      <eb:To>
        <eb:PartyId eb:type="urn:x12.org.IO5:01">webservices.sabre.com</eb:PartyId>
      </eb:To>
      <eb:ConversationId>111@gandakiintl.com</eb:ConversationId>
      <eb:Service eb:type="SabreXML">Enhanced Air Book Request</eb:Service>
      <eb:Action>EnhancedAirBookRQ</eb:Action>
      <eb:CPAID>T198</eb:CPAID>
      <eb:MessageData>
        <eb:MessageId>mid:11110info@gandakiintl.com</eb:MessageId>
        <eb:Timestamp>2016-10-17T05-27-10Z</eb:Timestamp>
        <eb:TimeToLive>2016-10-17T05-27-10Z</eb:TimeToLive>
      </eb:MessageData>
    </eb:MessageHeader>
    <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
      <wsse:BinarySecurityToken>Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/ACPCRTD!ICESMSLB\/CRT.LB!-3322625022286234335!532307!0</wsse:BinarySecurityToken>
    </wsse:Security>
  </soap-env:Header>
  <soap-env:Body>
    <EnhancedAirBookRQ xmlns="http://services.sabre.com/sp/eab/v3_6" version="3.6.0" HaltOnError="true">
      <OTA_AirBookRQ>
        <HaltOnStatus Code="UC"/>
        <HaltOnStatus Code="LL"/>
        <HaltOnStatus Code="UL"/>
        <HaltOnStatus Code="UN"/>
        <HaltOnStatus Code="NO"/>
        <HaltOnStatus Code="HL"/>
        <OriginDestinationInformation>
          <FlightSegment NumberInParty="1" Status="NN" FlightNumber="281" ResBookDesigCode="W" DepartureDateTime="2017-04-13T13:10:00" ArrivalDateTime="2017-04-13T14:40:00">
            <DestinationLocation LocationCode="DEL"/>
            <Equipment AirEquipType="73H"/>
            <MarketingAirline FlightNumber="281" Code="9W"/>
            <OriginLocation LocationCode="KTM"/>
          </FlightSegment>
        </OriginDestinationInformation>
      </OTA_AirBookRQ>
      <OTA_AirPriceRQ>
        <PriceRequestInformation Retain="true">
          <OptionalQualifiers>
            <FlightQualifiers>
              <VendorPrefs>
                <Airline Code="9W"/>
              </VendorPrefs>
            </FlightQualifiers>
            <PricingQualifiers CurrencyCode="NPR">
              <PassengerType Code="ADT" Force="true" Quantity="1"/>
              <Taxes>
                <TaxExempt Code="NQ"/>
              </Taxes>
            </PricingQualifiers>
          </OptionalQualifiers>
        </PriceRequestInformation>
      </OTA_AirPriceRQ>
      <PostProcessing IgnoreAfter="false">
        <RedisplayReservation/>
      </PostProcessing>
      <PreProcessing IgnoreBefore="false">            </PreProcessing>
    </EnhancedAirBookRQ>
  </soap-env:Body>
</soap-env:Envelope>

EnhancedBookRS.xml

    <?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Header>
    <eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1">
      <eb:From>
        <eb:PartyId eb:type="urn:x12.org.IO5:01">webservices.sabre.com</eb:PartyId>
      </eb:From>
      <eb:To>
        <eb:PartyId eb:type="urn:x12.org.IO5:01">info@gandakiintl.com</eb:PartyId>
      </eb:To>
      <eb:CPAId>T198</eb:CPAId>
      <eb:ConversationId>111@gandakiintl.com</eb:ConversationId>
      <eb:Service eb:type="SabreXML">Enhanced Air Book Request</eb:Service>
      <eb:Action>EnhancedAirBookRS</eb:Action>
      <eb:MessageData>
        <eb:MessageId>bk97jgyj2</eb:MessageId>
        <eb:Timestamp>2017-01-03T06:01:43</eb:Timestamp>
        <eb:RefToMessageId>mid:11110info@gandakiintl.com</eb:RefToMessageId>
      </eb:MessageData>
    </eb:MessageHeader>
    <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
      <wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/ACPCRTD!ICESMSLB\/CRT.LB!-3322625022286234335!532307!0</wsse:BinarySecurityToken>
    </wsse:Security>
  </soap-env:Header>
  <soap-env:Body>
    <EnhancedAirBookRS xmlns="http://services.sabre.com/sp/eab/v3_6">
      <ns2:ApplicationResults xmlns:ns2="http://services.sabre.com/STL_Payload/v02_01" status="NotProcessed">
        <ns2:Error type="BusinessLogic" timeStamp="2017-01-03T00:01:43.090-06:00">
          <ns2:SystemSpecificResults>
            <ns2:Message code="ERR.SWS.HOST.ERROR_IN_RESPONSE">CODE - UC SEG STATUS NOT ALLOWED-0003</ns2:Message>
          </ns2:SystemSpecificResults>
        </ns2:Error>
      </ns2:ApplicationResults>
      <OTA_AirBookRS>
        <OriginDestinationOption>
          <FlightSegment ArrivalDateTime="04-13T14:40" DepartureDateTime="04-13T13:10" FlightNumber="0281" NumberInParty="001" ResBookDesigCode="W" Status="NN" eTicket="true">
            <DestinationLocation LocationCode="DEL"/>
            <MarketingAirline Code="9W" FlightNumber="0281"/>
            <OriginLocation LocationCode="KTM"/>
          </FlightSegment>
        </OriginDestinationOption>
      </OTA_AirBookRS>
      <TravelItineraryReadRS>
        <TravelItinerary>
          <CustomerInfo/>
          <ItineraryInfo>
            <ItineraryPricing>
              <PriceQuote RPH="1">
                <MiscInformation>
                  <SignatureLine ExpirationDateTime="00:00" Source="SYS" Status="ACTIVE">
                    <Text>T198 T198*AGT 1131/03JAN17</Text>
                  </SignatureLine>
                  <TicketingFees Disclaimer="ONE OR MORE FORM OF PAYMENT FEES MAY APPLY"/>
                  <TicketingFees Disclaimer="ACTUAL TOTAL WILL BE BASED ON FORM OF PAYMENT USED"/>
                  <TicketingFees Disclaimer="FEE CODE     DESCRIPTION                         FEE">
                    <FeeInformation Amount="399" CurrenyCode="" Description="" FunctionCode="FCA" ServiceType="OB">- ANY CC</FeeInformation>
                  </TicketingFees>
                </MiscInformation>
                <PricedItinerary DisplayOnly="false" InputMessage="WPA9WMNPRP1ADTXOTE-NQRQ" RPH="1" StatusCode="A" TaxExempt="false" ValidatingCarrier="9W">
                  <AirItineraryPricingInfo>
                    <ItinTotalFare>
                      <BaseFare Amount="3425" CurrencyCode="NPR"/>
                      <Taxes>
                        <Tax Amount="6377" TaxCode="XT"/>
                        <TaxBreakdownCode TaxPaid="false">0NQ</TaxBreakdownCode>
                        <TaxBreakdownCode TaxPaid="false">791NP</TaxBreakdownCode>
                        <TaxBreakdownCode TaxPaid="false">1000B6</TaxBreakdownCode>
                        <TaxBreakdownCode TaxPaid="false">1159IN</TaxBreakdownCode>
                        <TaxBreakdownCode TaxPaid="false">3427YQ</TaxBreakdownCode>
                      </Taxes>
                      <TotalFare Amount="9802" CurrencyCode="NPR"/>
                      <Totals>
                        <BaseFare Amount="3425"/>
                        <Taxes>
                          <Tax Amount="6377"/>
                        </Taxes>
                        <TotalFare Amount="9802"/>
                      </Totals>
                    </ItinTotalFare>
                    <PassengerTypeQuantity Code="ADT" Quantity="01"/>
                    <PTC_FareBreakdown>
                      <Endorsements>
                        <Endorsement type="SYSTEM_ENDORSEMENT">
                          <Text>NON ENDO</Text>
                        </Endorsement>
                        <Endorsement type="PRICING_PARAMETER">
                          <Text>WPA9W$MNPR$P1ADT$XO$TE-NQ$RQ</Text>
                        </Endorsement>
                        <Endorsement type="WARNING">
                          <Text>VALIDATING CARRIER SPECIFIED - 9W</Text>
                        </Endorsement>
                      </Endorsements>
                      <FareBasis Code="W2STOWNP"/>
                      <FareCalculation>
                        <Text>KTM 9W DEL Q15.00 16.61NUC31.61END ROE108.347088</Text>
                      </FareCalculation>
                      <FareSource>ATPC</FareSource>
                      <FlightSegment ConnectionInd="O" DepartureDateTime="04-13T13:10" FlightNumber="281" ResBookDesigCode="W" SegmentNumber="1" Status="OK">
                        <BaggageAllowance Number="20K"/>
                        <FareBasis Code="W2STOWNP"/>
                        <MarketingAirline Code="9W" FlightNumber="281"/>
                        <OriginLocation LocationCode="KTM"/>
                        <ValidityDates>
                          <NotValidAfter>2017-04-13</NotValidAfter>
                          <NotValidBefore>2017-04-13</NotValidBefore>
                        </ValidityDates>
                      </FlightSegment>
                      <FlightSegment>
                        <OriginLocation LocationCode="DEL"/>
                      </FlightSegment>
                      <ResTicketingRestrictions>LAST DAY TO PURCHASE 10JAN/2359</ResTicketingRestrictions>
                      <ResTicketingRestrictions>GUARANTEED FARE APPL IF PURCHASED BEFORE 10JAN</ResTicketingRestrictions>
                    </PTC_FareBreakdown>
                  </AirItineraryPricingInfo>
                </PricedItinerary>
                <ResponseHeader>
                  <Text>FARE - PRICE RETAINED</Text>
                  <Text>FARE USED TO CALCULATE DISCOUNT</Text>
                  <Text>FARE NOT GUARANTEED UNTIL TICKETED</Text>
                </ResponseHeader>
                <PriceQuotePlus DiscountAmount="0" DisplayOnly="false" DomesticIntlInd="I" IT_BT_Fare="BT" ItineraryChanged="false" ManualFare="false" NUCSuppresion="false" NegotiatedFare="false" PricingStatus="M" SubjToGovtApproval="false" SystemIndicator="S" VerifyFareCalc="false">
                  <TicketingInstructionsInfo/>
                </PriceQuotePlus>
              </PriceQuote>
              <PriceQuoteTotals>
                <BaseFare Amount="3425.00"/>
                <Taxes>
                  <Tax Amount="6377.00"/>
                </Taxes>
                <TotalFare Amount="9802.00"/>
              </PriceQuoteTotals>
            </ItineraryPricing>
            <ReservationItems>
              <Item RPH="1">
                <FlightSegment AirMilesFlown="0507" ArrivalDateTime="04-13T14:40" DayOfWeekInd="4" DepartureDateTime="2017-04-13T13:10" ElapsedTime="01.45" FlightNumber="0281" IsPast="false" NumberInParty="01" ResBookDesigCode="W" SegmentNumber="0001" SmokingAllowed="false" SpecialMeal="false" Status="SS" StopQuantity="00" eTicket="true">
                  <DestinationLocation LocationCode="DEL" Terminal="TERMINAL 3" TerminalCode="3"/>
                  <Equipment AirEquipType="73H"/>
                  <MarketingAirline Code="9W" FlightNumber="0281"/>
                  <Meal Code="L"/>
                  <OriginLocation LocationCode="KTM"/>
                  <SupplierRef ID="DC9W"/>
                  <UpdatedArrivalTime>04-13T14:40</UpdatedArrivalTime>
                  <UpdatedDepartureTime>04-13T13:10</UpdatedDepartureTime>
                </FlightSegment>
              </Item>
              <Item RPH="2">
                <FlightSegment AirMilesFlown="0507" ArrivalDateTime="04-13T14:40" DayOfWeekInd="4" DepartureDateTime="2017-04-13T13:10" ElapsedTime="01.45" FlightNumber="0281" IsPast="false" NumberInParty="01" ResBookDesigCode="W" SegmentNumber="0002" SmokingAllowed="false" SpecialMeal="false" Status="UC" StopQuantity="00" eTicket="false">
                  <DestinationLocation LocationCode="DEL" Terminal="TERMINAL 3" TerminalCode="3"/>
                  <Equipment AirEquipType="73H"/>
                  <MarketingAirline Code="9W" FlightNumber="0281"/>
                  <Meal Code="L"/>
                  <OriginLocation LocationCode="KTM"/>
                  <SupplierRef ID="DC9W"/>
                  <UpdatedArrivalTime>04-13T14:40</UpdatedArrivalTime>
                  <UpdatedDepartureTime>04-13T13:10</UpdatedDepartureTime>
                </FlightSegment>
              </Item>
            </ReservationItems>
          </ItineraryInfo>
          <ItineraryRef AirExtras="false" InhibitCode="U" PartitionID="AA" PrimeHostID="1B">
            <Header>CURRENTLY DISPLAYING A PNR OWNED BY THE SABRE PRIME HOST</Header>
            <Header>RULES AND FUNCTIONALITY FOR THAT PRIME HOST WILL APPLY</Header>
            <Header>PRICE QUOTE RECORD - MODIFIED</Header>
            <Source PseudoCityCode="T198"/>
          </ItineraryRef>
          <SpecialServiceInfo RPH="001" Type="GFX">
            <Service SSR_Code="OSI">
              <Airline Code="1B"/>
              <Text>PLEASE TICKET FARE AS PER TKT/TL IN PQ</Text>
            </Service>
          </SpecialServiceInfo>
        </TravelItinerary>
      </TravelItineraryReadRS>
    </EnhancedAirBookRS>
  </soap-env:Body>
</soap-env:Envelope>
user254153
  • 1,855
  • 4
  • 41
  • 84

7 Answers7

3

I have to check your code, One thing is that if you getting your result from postman .. Then there is a good option for getting curl code from the postman. By click on code > change HTTP option to PHP curl >copy to clipboard . If you try with this way of write code, you have to change little changes.

And one more thing, A very good answer have given here UC status . UC status related to UN-CONFIRMED status. Please have a look here. Thanks

This is an example , for how to pass your post field data in xml form :

 $curl = curl_init();

    curl_setopt_array($curl, array(
      CURLOPT_PORT => "",
      CURLOPT_URL => "url here",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n  <soap:Body> soap body part </soap:Body>\n</soap:Envelope>",
      CURLOPT_HTTPHEADER => array(
        "cache-control: no-cache",
        "content-type: text/xml"
      ),
    ));
    $response = curl_exec($curl);
    $err = curl_error($curl);
    curl_close($curl);
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
Community
  • 1
  • 1
Kumar Rakesh
  • 2,718
  • 2
  • 18
  • 39
  • I got it already working copying the code from post man itself. But I want to know why its not working in my CURL request. Is it the problem of my header. – user254153 Jan 13 '17 at 07:01
  • @user254153 Can you please share your curl code getting from postman. – Kumar Rakesh Jan 13 '17 at 07:07
  • $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://sws3-crt.cert.sabre.com/", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $xmldata, CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: text/xml" // "postman-token: 1bf536a9-55a2-fbf7-6e04-0f2bf4abebff" ), )); – user254153 Jan 13 '17 at 08:23
  • I think you should pass $xmldata in form of xml in CURLOPT_POSTFIELDS=> please try with this e.g. code e.g. i have edit my answer for it. – Kumar Rakesh Jan 13 '17 at 09:31
1

I have tried you code and modified some part of it. please try using below code

        <?php
    header('Content-Type: application/xml');
    $xmldata='<?xml version="1.0" encoding="utf-8"?>
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Header>
    <eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader">
    <eb:From>
    <eb:PartyId eb:type="urn:x12.org.IO5:01">info@gandakiintl.com</eb:PartyId>
    </eb:From>
    <eb:To>
    <eb:PartyId eb:type="urn:x12.org.IO5:01">webservices.sabre.com</eb:PartyId>
    </eb:To>
    <eb:ConversationId>111@gandakiintl.com</eb:ConversationId>
    <eb:Service eb:type="SabreXML">Enhanced Air Book Request</eb:Service>
    <eb:Action>EnhancedAirBookRQ</eb:Action>
    <eb:CPAID>T198</eb:CPAID>
    <eb:MessageData>
    <eb:MessageId>mid:11110info@gandakiintl.com</eb:MessageId>
    <eb:Timestamp>2016-10-17T05-27-10Z</eb:Timestamp>
    <eb:TimeToLive>2016-10-17T05-27-10Z</eb:TimeToLive>
    </eb:MessageData>
    </eb:MessageHeader>
    <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
    <wsse:BinarySecurityToken>Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/ACPCRTD!ICESMSLB\/CRT.LB!-3322625022286234335!532307!0</wsse:BinarySecurityToken>
    </wsse:Security>
    </soap-env:Header>
    <soap-env:Body>
    <EnhancedAirBookRQ xmlns="http://services.sabre.com/sp/eab/v3_6" version="3.6.0" HaltOnError="true">
    <OTA_AirBookRQ>
    <HaltOnStatus Code="UC"/>
    <HaltOnStatus Code="LL"/>
    <HaltOnStatus Code="UL"/>
    <HaltOnStatus Code="UN"/>
    <HaltOnStatus Code="NO"/>
    <HaltOnStatus Code="HL"/>
    <OriginDestinationInformation>
    <FlightSegment NumberInParty="1" Status="NN" FlightNumber="281" ResBookDesigCode="W" DepartureDateTime="2017-04-13T13:10:00" ArrivalDateTime="2017-04-13T14:40:00">
    <DestinationLocation LocationCode="DEL"/>
    <Equipment AirEquipType="73H"/>
    <MarketingAirline FlightNumber="281" Code="9W"/>
    <OriginLocation LocationCode="KTM"/>
    </FlightSegment>
    </OriginDestinationInformation>
    </OTA_AirBookRQ>
    <OTA_AirPriceRQ>
    <PriceRequestInformation Retain="true">
    <OptionalQualifiers>
    <FlightQualifiers>
    <VendorPrefs>
    <Airline Code="9W"/>
    </VendorPrefs>
    </FlightQualifiers>
    <PricingQualifiers CurrencyCode="NPR">
    <PassengerType Code="ADT" Force="true" Quantity="1"/>
    <Taxes>
    <TaxExempt Code="NQ"/>
    </Taxes>
    </PricingQualifiers>
    </OptionalQualifiers>
    </PriceRequestInformation>
    </OTA_AirPriceRQ>
    <PostProcessing IgnoreAfter="false">
    <RedisplayReservation/>
    </PostProcessing>
    <PreProcessing IgnoreBefore="false">            </PreProcessing>
    </EnhancedAirBookRQ>
    </soap-env:Body>
    </soap-env:Envelope>';

    error_reporting(E_ALL);
    $wsdl = 'https://sws3-crt.cert.sabre.com';

    $header = array(
        "Content-type: text/xml;charset=\"utf-8\"",
        "Accept: text/xml",
        "Cache-Control: no-cache",
        "Pragma: no-cache",
        "SOAPAction: \"\"",
        "Content-length: " . strlen($xmldata),
    );
        $ch = curl_init();      
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($ch, CURLOPT_URL, $wsdl);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_ENCODING, '');
        curl_setopt($ch, CURLOPT_POSTFIELDS, $xmldata); // the SOAP request
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);     
        $response = curl_exec($ch);
        $err = curl_error($ch);
       print_r($response);
       print_r($err);

    ?>
Nishant Nair
  • 1,999
  • 1
  • 13
  • 18
0

I don't know the sabre api, but it Looks like you malformed the request with the segement UC.

Try to look in the api docs or try to contact the help desk.

In the sample request there es is no <haltonstatus/>, Look here https://developer.sabre.com/docs/read/soap_apis/air/book/orchestrated_air_booking

arnebr
  • 545
  • 1
  • 6
  • 17
  • I contacted them. They tried with POSTMAN api request service all workflow are working well. Even when I tried with POSTMAN I can successfully get it working. But with PHP CURL request it is giving UC status. So I guess its error in my CURL request. In the sample request there es is no -> I am not getting what you are trying to say. – user254153 Jan 03 '17 at 07:22
  • Oh sorry, i typed it on mobile... In the sample there is no , what will happen, if you leave it out.. – arnebr Jan 03 '17 at 10:21
  • HaltOnStatus will halt the process if there is any status mentioned there like UC in my case and other status. – user254153 Jan 03 '17 at 10:51
0

UC status means that the itinerary you booked is not available. It could be due to a number of different things like date, class of service, etc.

Where did you get the itinerary information from? If you're using a shopping service, I'd advise you to run it again and see if the same itinerary is still returned, or if the class of service changed.

Bruno
  • 865
  • 6
  • 13
  • I got iteinerary information from BargainFinderMaxRQ. I am confused in one thing that. When I book for flight number 259 and in EnhancedBookRQ, I get 2 flightsegment of same flight number (259) with satatus UC and SS. What does that mean?. But I get UC status as error and status not processed. – user254153 Jan 04 '17 at 04:01
  • Maybe you run the request 2 times? UC is an invalid status and you should ignore (remove) that segment. SS is a valid status. – Bruno Jan 04 '17 at 16:48
  • No there is only one request. – user254153 Jan 06 '17 at 07:00
0

Write xml content to a file named is soap_this.xml and using curl command to send request: curl -X POST --header "Content-Type:text/xml;charset=UTF-8" --data @soap_get.xml your_url

Mian Anjum
  • 379
  • 2
  • 3
  • 16
0

That because by the time you creating pnr request, there might not be a available flight for your requesting cabin type. Even though atleast one flight sector has unavailability Sabre does not allow to create pnr

Using following Sabre commands you can check availability of flight segments

enter image description here

More details about commands: http://www.emquest.ae/downloads/STM/Quick%20Reference%20English.pdf

0

In your Request you have set this option:

<HaltOnStatus Code="UC"/>
<HaltOnStatus Code="LL"/>
<HaltOnStatus Code="UL"/>
<HaltOnStatus Code="UN"/>
<HaltOnStatus Code="NO"/>
<HaltOnStatus Code="HL"/>

which means if the segment that you are trying to sell is not confirmed because of availability etc then end the transaction.

Baz1nga
  • 15,485
  • 3
  • 35
  • 61