Reason Code List
Supply the universal profile ID of the account the reason codes you wish to retrieve belong to in and the accountId.
Sample Reason Code List request data
xmlns:v1="http://www.travelport.com/schema/policy/admin/reasoncode/v1"
<v1:performCRUDRQ>
<v1:BasePolicyRequestHeader accountId="749538" requestCategory="List" requestorId="DAVES" source="Web"/>
</v1:performCRUDRQ>
The following elements are supplied in a List request:
performCRUDRS / BasePolicyResponseHeader
Sample Reason Code List response data
xmlns:ns5="http://www.travelport.com/schema/policy/admin/reasoncode/v1"
xmlns:ns2="http://www.travelport.com/schema/policy/admin/common/v1"
<ns5:performCRUDRS>
<ns5:BasePolicyResponseHeader accountId="749538" requestorId="DAVES" />
<ns2:AdditionalMessage iD="0" status="Processed"/>
<ns5:ReasonCodeResponseProfile reasonCodeId="100505">
<ns2:ProfileResponse>
<ns2:Profile>
<ns2:Name>ReasonCodePolicy1</ns2:Name>
<ns2:Summary/>
</ns2:Profile>
<ns2:AttachedTo id="100372" name="SandboxPG1"/>
</ns2:ProfileResponse>
</ns5:ReasonCodeResponseProfile>
<ns5:ReasonCodeResponseProfile reasonCodeId="100695">
<ns2:ProfileResponse>
<ns2:Profile>
<ns2:Name>SBReasonCode1</ns2:Name>
<ns2:Summary>Test Reason Code Group for Sandbox documentation</ns2:Summary>
</ns2:Profile>
</ns2:ProfileResponse>
</ns5:ReasonCodeResponseProfile>
</ns5:performCRUDRS>
The following elements are found in a List response:
performCRUDRS / BasePolicyResponseHeader
AdditionalMessage – overall status of the response
attribute: iD – “0” / not used on a Reason Code List
attribute: status – will be either “Processed” or “Failure”.
ReasonCodeResponseProfile – wrapper for a collection of individual Reason Code data
attribute: reasonCodeId – id within the Policy DB of this Reason Code collection
ProfileResponse – wrapper element
Profile – wrapper element for Reason Code profile data
Name – name of this reason code collection
Summary – user defined summary describing the purpose / application of this reason code collection
AttachedTo – information about Policy Group to which Reason Code data is attached (can repeat)
attribute: id – Policy DB id of the Policy Group to which Reason Code data is attached
attribute: name – name of Policy Group to which Reason Code data is attached
Considerations for a Reason Code List
A valid response will contain the reason code id, name and summary information for all the reason code groups associated with that Account.
Sample Request and Response
See the Downloads page to download a zip file containing the following XML files.
Sample request:
ReasonCodeListRQ.xml
Sample response:
ReasonCodeListRS.xml