API Description: Make a booking on a tour
API URL: https://www.gotravelmanager.com/TravelManager/API/Tour/tourBooking.php?record={$tourid}&appid={$appid}&token={$token}
Variables in the URL:
* tourid : id of the tour
* appid : your unique application ID
* token : your unique token
HTTP Method: POST
Variables to POST:
* name_title: Lead passenger title
* name_first: Lead passenger forename
* name_last: Lead passenger surname
* address_0: Address street line 1
* address_1: Address street line 2
* address_2: Address area
* address_3: Address city
* address_4: Address county
* address_5: Address country
* address_6: Address postcode
* phone_home: Lead passenger home phone
* phone_work: Lead passenger work phone
* phone_mobile: Lead passenger mobile phone
* email: Lead passenger email address
* num_adults: Number of adults passengers
* num_children: Number of children passengers
* reseller: The reseller code (Not in use at the moment)
* tripId: a tour can run multiple times on a day, and this tripId to determine which trip it is //Updated on 18/07/2009
Example – Response Code 701 (Authentication Failed)
<?xml version=”1.0″ encoding=”UTF-8″?>
<rsp stat=”invalid” code=”701″ created-at=”2009-06-26T09:41:14+01:00″>
<errorMessage>Authentication Failed</errorMessage>
</rsp>
Example – Response Code 703 (Tour Not Found)
<?xml version=”1.0″ encoding=”UTF-8″?>
<rsp stat=”invalid” code=”703″ created-at=”2009-06-26T09:38:42+01:00″>
<errorMessage>Tour Not Found</errorMessage>
</rsp>
Example – Response Code 707 (Invalid booking information)
<?xml version=”1.0″ encoding=”UTF-8″?>
<rsp stat=”invalid” code=”707″ created-at=”2009-07-17T12:56:16+01:00″>
<errorMessage>Invalid surname</errorMessage>
<errorMessage>Invalid email address</errorMessage>
</rsp>
Example – Response Code 700 (Successful)
<?xml version=”1.0″ encoding=”UTF-8″?>
<rsp stat=”valid” code=”700″ created-at=”2009-07-17T13:12:02+01:00″>
<bookingReference>TB00000592<bookingReference>
</rsp>
Example Booking Form
<form action=”http://www.gotravelmanager.com/TravelManager/API/Tour/tourBooking.php?record=1127&appid=$appid&token=$token” method=”POST”>
<p>Adults: <input name=”num_adults” value=”" /></p>
<p>Children: <input name=”num_children” value=”" /></p>
<p>Reseller code (*Not in use at the moment): <input name=”reseller” value=”" /></p>
<p>Trip id: <select name=”tripId”><option value=”1″>Trip start time: 2009-07-18 09am</select></p>
<br/><br/><b>Lead Customer</b><br/><br/>
<p>Title: <input name=”name_title” value=”" /></p>
<p>Forename: <input name=”name_first” value=”" /></p>
<p>Surname: <input name=”name_last” value=”" /></p>
<p>Street line 1: <input name=”address_0″ value=”" /></p>
<p>Street line 2: <input name=”address_1″ value=”" /></p>
<p>Area: <input name=”address_2″ value=”" /></p>
<p>City: <input name=”address_3″ value=”" /></p>
<p>County: <input name=”address_4″ value=”" /></p>
<p>Country: <input name=”address_5″ value=”" /></p>
<p>Postcode: <input name=”address_6″ value=”" /></p>
<p>Phone (home): <input name=”phone_home” value=”" /></p>
<p>Phone (work): <input name=”phone_work” value=”" /></p>
<p>Phone (mobile): <input name=”phone_mobile” value=”" /></p>
<p>Email: <input name=”email” value=”" /></p>
<p><input name=”submit” value=”submit” type=”submit”></p>
</form>