Как получить налог на перелет с помощью API OTA_AirPriceRQ - PullRequest
0 голосов
/ 29 января 2019

Я использую API OTA_AirAvailRQ для получения списка доступных рейсов. Я хочу получить информацию о тарифах и налогах на рейс, но API OTA_AirPriceRQ выдает мне ошибку.

Это мой запрос:

 <OTA_AirPriceRQ Version="2.17.0" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <OriginDestinationInformation>
           <FlightSegment ArrivalDateTime="2019-02-21T17:00" ConnectionInd="O" DepartureDateTime="2019-02-21T15:00" FlightNumber="802" ResBookDesigCode="Y" RPH="1">
                <DestinationLocation LocationCode="KUL"/>
                <MarketingCarrier Code="OD" FlightNumber="802"/>
                <OriginLocation LocationCode="SIN"/>
            </FlightSegment>
        </OriginDestinationInformation>
        <PriceRequestInformation Retain="true">
            <OptionalQualifiers>
                <PricingQualifiers CurrencyCode="USD">
                    <PassengerType Code="ADT" Force="true" Quantity="1"/>
                </PricingQualifiers>
            </OptionalQualifiers>
        </PriceRequestInformation>
    </OTA_AirPriceRQ>

Это ответ API:

 <OTA_AirPriceRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01" Version="2.17.0">
        <stl:ApplicationResults status="NotProcessed">
            <stl:Error type="BusinessLogic" timeStamp="2019-01-29T02:59:18-06:00">
                <stl:SystemSpecificResults>
                    <stl:Message>FORMAT, CHECK SEGMENT NUMBER-0003</stl:Message>
                    <stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
                </stl:SystemSpecificResults>
            </stl:Error>
        </stl:ApplicationResults>
    </OTA_AirPriceRS>

1 Ответ

0 голосов
/ 30 января 2019

Возможно, вы захотите удалить узел OriginDestination в вашем запросе.В соответствии с дизайном службы, который не используется:

<!-- Optional -->
<!-- Repeat Factor=0 -->
<!--Please note that this node is reserved for future expansion and is not currently in use.-->

Я бы посоветовал использовать атрибут ReturnHostCommand = "true" в главном узле запроса для возврата в формате WP и для возможностичтобы узнать, какой формат вы отправляете на родную Sabre.

...