Login | Register

Function: Insert Booking

Now that you have gathered the vehicle, luggage, joorney type and price, you are ready to insert a booking to the system. See example below;


<?xml version='1.0' encoding='utf-8'?>
<JobFile>
  <appID>23423413</appID>
  <appSecret>abe1f4dc775a5a055afcd2abfe137b67f615f0bf</appSecret>
  <customer>
    <email>customer@theirdomain.com</email>
    <name>Customer Name</name>
    <phoneNumber>03841XXXX</phoneNumber>
    <mobileNumber>080102XXXX</mobileNumber>
    <company>Customer Company</company>
    <extRef>V001</extRef>
  </customer>
  <journey>
    <datetimePickup>03-03-2016 05:00</datetimePickup>
    <datetimeReturn>04-03-2016 16:00</datetimeReturn>
    <collection>
      <address>Alderbury, Salisbury, Wiltshire SP5 3EN, UK</address>
      <note>Note1</note>
      <latitude>51.0550733</latitude>
      <longitude>-1.7381232000000182</longitude>
    </collection>
    <destination>
      <address>LEEDS HILTON, NEVILLE STREET, LEEDS, LS14</address>
      <note>Note2</note>
      <latitude>52.4836536</latitude>
      <longitude>-1.8926380999999992</longitude>
    </destination>
    <totalPassenger>2</totalPassenger>
    <vehicle>3</vehicle>
    <luggage>23</luggage>
    <journeyType>42</journeyType>
  </journey>
  <passenger>
    <email>passenger@theirdomain.com</email>
    <name>Pax Name</name>
    <phoneNumber>03841XXXX</phoneNumber>
  </passenger>
</JobFile>

Most of these tags have been covered in previous sections.  However, please note other tags as outlined below;

Tag Format Notes
<customer>   Header tag for customer details
<email> email
The customer email address - required
<name>
string
Customer Name - required
<phoneNumber> string Customer Phone - Optional
<mobileNumber> string Customer Mobile - Optional
<company> string Customer Mobile - Optional
<extRef> string Your Reference - Optional (does not need to be unique)
<passenger>   Header tag for passenger details
<email> email The passenger email address - required
<name> string Passenger Name - required

Data Returned - Insert Booking:

The return code of 200 confirms the booking was successfully added. Where an online price can not be calculated, you will get a message of Insert False and a reason. These bookings will have to be manually dealt with at the present time and the quote is not inserted.

Callback : { 
    "code":530,
    "message":"Insert False",
    "quoteId":0,
    "price":0,
    "error":[
       "WARNING - Maybe over driver hours.",
       "WARNING - Maybe require driver accommodation",
       "WARNING - Maybe over driver hours. (maximum limit is:2)"
    ]
}
Callback : {
    "code":200,
    "message":
    "Insert Finish",
    "quoteId":292407,
    "price":445,
    "error":[]
}