18. The get_reservation_link method¶
This method returns a link to a web page to reserve the given trolley. It is an alternative to calling “make_reservation” for users who cannot provide their own checkout and payment pages, or who choose not to. The transaction will be completed by the customer interacting directly with TicketSwitch’s servers.
18.1. Required inputs¶
Like “make_reservation”, this call requires a “start_session” compatible crypto block and a “trolley_token”. It will not respond to a “describe_trolley” element.
18.1.1. Example input¶
<get_reservation_link>
<user_id>demo</user_id>
<crypto_block>M_--hK9EA5-2pQPbRp1fLhr5lQCCZ9sPs54qY7MaAk98kZIHR
6hNwNQW6QmEWJYetXvdZ8CRmfzwk5DvpXrn_GLXIdyvVWTv70s1lNh5fbp5zsU2
JvdsDoYct0--Y</crypto_block>
<trolley_token>c1--qfcq1g9hID4DEj3yf4ZBB6_gbEmAhEYChLQMfJCELmm5
jZtgn1uZs6xIXQ6vqjGon_-Z5evlfiaRcMwruNrjy9gBXH6ZJ02KWK6tTbvculH
_XUxCSF-f9Ix6uw0eDeLTiVVeWlKSIhqtoPWBPTdvFoyQyHnxvJKAX7blzg8lec
pIjTSB1H8VuT0dY8QI0Y34165sYULFE_sLyBISywwCm-m5Sf3Ao27PidFr6l0bi
OI1-6LzK_Zoi9_--Z</trolley_token>
</get_reservation_link>
18.2. Output data¶
If successful, the output of this method is a single “reservation_link” element containing a valid absolute URL [1] where the customer should be redirected to complete the purchase. The trolley will not be reserved by the xml_core.
The URL should be presented so that it is hard for a ‘double click’ to cause an extra reservation, which could cause genuine reservation attempts to fail.
18.2.1. Example output¶
<get_reservation_link_result>
<reservation_link>https://demo.tsd-aff.com/tickets/web_addr
.buy?crypto_block=c2--tNKVifrR8YKaXPYb4H5Zr8NcuO7UAhjhkBky1-e6P
vugwPQROJtn837pKjXFFF5QTQ9CoELONvPgVQ9oQIKiEvxtAYEYSRj26MQjZy5_
gmm3Xf9XWW411JWj0zh5tfoaIcsd7e2-sfoEYQfdgQl5vPBlWPAt9tjlqgZ0vmU
12-lDbigUWaplV1HKEs2p1W66CMUmBFQtSGNVZNXYcc6P4GQWqnjDNmirRg7nJM
z9eBfF35DPbQsSURQ7sWNrHYsZk7DklI2BKLtN2-Z</reservation_link>
</get_reservation_link_result>
18.3. Potential failure codes¶
This call may respond with any failure codes returned by “make_reservation” with the same meanings.
[1] | Depending on the context, valid URLs may require additional encoding before being output. This applies in particular to URLs containing ampersands if the output is HTML. |