22. The lookup_agent_reference method¶
Travel agents and similar customers may record their own agent reference at the time of purchase. They can later call lookup agent reference to search for transactions marked with their agent reference. Full transactional detail can then be looked up for the resulting transactions using “transactioninfo”.
22.1. Required inputs¶
A “user_id”, “agent_reference” and “crypto_block” are required. Alternatively you can specify a” user_passwd” instead of the “crypto_block”.
22.1.1. Example input¶
<lookup_agent_reference>
<user_id>..the user id...</user_id>
<agent_reference>...the agent ref...</agent_reference>
<crypto_block>...the crypto block...</crypto_block>
</lookup_agent_reference>
22.2. Output data¶
A list of transactions are returned, including the “transaction_id” and “purchase_iso8601_date_and_time”. Note that more than one transaction could be returned if the same agent reference has been used multiple times. Also note that the transactions listed will not necessarily have resulted in a successful purchase – it is possible for the transaction to have failed card authorisation or the booking into the ticketing system to have failed.
22.2.1. Example output¶
<lookup_agent_reference_result>
<subdomain_user_is_bad>no</subdomain_user_is_bad>
<transaction>
<purchase_iso8601_date_and_time>2016-03-14T16:18:48Z</purchase_iso8601_date_and_time>
<transaction_id>T000-XJ6E-600R-X1S7</transaction_id>
<sub_user/>
</transaction>
<transaction>
<purchase_iso8601_date_and_time>2016-03-14T16:17:18Z</purchase_iso8601_date_and_time>
<transaction_id>T000-0120-63NR-O13C</transaction_id>
<sub_user/>
</transaction>
</lookup_agent_reference_result>