如何使用EPS_EXT_ProfileSearchRQ获取Sabre Traveler个人资料列表

时间:2019-06-08 19:28:04

标签: c# .net xml soap sabre

我正在使用EPS_EXT_ProfileSearchRQ Sabre API,尝试为给定的公司资料收集资料参考列表(TPA_Identities)。我的有效负载在下方(已删除)-我返回的只是公司资料本身,而不是旅行者级别的引用,尽管指出了ProfileTypeCode为“ TVL”。

此请求我出了什么问题?

请求:

<?xml version="1.0" encoding="utf-16"?>
<Sabre_OTA_ProfileSearchRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="6.46" ReturnPaymentCardToken="Y">
  <ProfileSearchCriteria ProfileNameOnly="Y" ReturnCount="250" xmlns="http://www.sabre.com/eps/schemas">
    <TPA_Identity ProfileTypeCode="TVL" ClientCode="TN" ClientContextCode="TMP" ProfileName="COMPANY NAME" DomainID="XX12" />
    <CustomerReferenceInfo />
  </ProfileSearchCriteria>

响应:

<?xml version="1.0" encoding="utf-16"?>
<Sabre_OTA_ProfileSearchRS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" TimeStamp="2019-06-08T19:19:31.529Z" Version="6.51">
  <ResponseMessage xmlns="http://www.sabre.com/eps/schemas">
    <Success />
  </ResponseMessage>
  <ProfileInfo xmlns="http://www.sabre.com/eps/schemas">
    <Profile CreateDateTime="2018-03-30T20:51:31.386Z" UpdateDateTime="2018-04-18T15:33:08.904Z" PrimaryLanguageIDCode="EN-US">
      <TPA_Identity ClientCode="TN" ClientContextCode="MYS" UniqueID="6164723212" ProfileTypeCode="TVL" ProfileName="COMPANY NAME" ProfileNameModifyIndicator="Y" ProfileDescription="COMPANY NAME" DomainID="XX12" ProfileStatusCode="AC">
        <ProfileSubType SubTypeCode="NN" />
      </TPA_Identity>
      <Traveler>
        <Customer ChildIndicator="N" SeniorIndicator="N" LapInfantIndicator="N" IsSubjectToSecureFlightRule="N">
          <Email EmailTypeCode="UNK" EmailAddress="SPETERSON@COMPANYNAME.COM" OrderSequenceNo="1" />
          <Address LocationTypeCode="BUS" Attention="COMPANY NAME" OrderSequenceNo="1">
            <AddressLine>5331 XXXX STREET</AddressLine>
            <CityName>ROGER</CityName>
            <PostalCd>81205</PostalCd>
            <StateCode>AK</StateCode>
          </Address>
          <CustLoyalty VendorTypeCode="CR" VendorCode="ZI" MembershipID="X1A87DG" OrderSequenceNo="1" />
        </Customer>
        <TPA_Extensions>
          <CustomerReferenceInfo TripTypeCode="AZ" BranchID="CMI" ReferenceID="888" OrderSequenceNo="1" />
          <STARData STARName="COMPANY NAME" OrderSequenceNo="1"></STARData>
        </TPA_Extensions>
      </Traveler>
    </Profile>
  </ProfileInfo>
</Sabre_OTA_ProfileSearchRS>

1 个答案:

答案 0 :(得分:1)

这完全取决于您如何构建“个人档案”结构。如果要查找与“ COMPANY NAME”公司资料相关联的所有Traveler资料,则可以使用以下方式:

<Sabre_OTA_ProfileSearchRQ xmlns="http://www.sabre.com/eps/schemas" xmlns:ns2="http://services.sabre.com/res/tir/v3_9" xmlns:ns3="http://services.sabre.com/res/or/v1_9" xmlns:ns4="http://services.sabre.com/STL/v01" xmlns:ns5="http://webservices.sabre.com/triprecord" xmlns:ns6="http://webservices.sabre.com/pnrbuilder/v1_19" xmlns:ns7="http://services.sabre.com/res/or/v1_14" TimeStamp="2019-06-10T17:04:53.879+08:00" Version="6.35">
        <ProfileSearchCriteria CountAll="Y" PageNumber="1" ReturnCount="50" SearchOperationType="AND">
            <TPA_Identity ClientCode="TN" ClientContextCode="TMP" DomainID="XX12" ProfileName="*" ProfileTypeCode="TVL"/>
            <AssociatedProfiles AssocProfileName="COMPANY NAME" IncludeTemplateAssoc="Y"/>
            <SortPreference SortByCreateDate="N" SortByProfileName="Y"/>
        </ProfileSearchCriteria>
    </Sabre_OTA_ProfileSearchRQ>

请记住,请求也正在寻找与IncludeTemplateAssoc =“ Y”关联的模板内的配置文件(如果可用)。因此,此搜索将通过概要文件本身或通过关联对象(模板)来查找所有与该特定CRP概要文件关联的TVL概要文件。