Login | Register

Function: Get Vehicle Options

The following code is a complete example of the code required to get Vehicle Options based on the number of passengers and the latitude and longitude of the journey.


<?xml version='1.0' encoding='utf-8'?>
<JobFile>
  <appID>23423413</appID>
  <appSecret>abe1f4dc775a5a055afcd2abfe137b67f615f0bf</appSecret>
  <getAjaxData>
    <getFor>Vehicle</getFor>
    <setPax>2</setPax>
    <datetimePickup>
      <date>18-11-2015</date>
      <time>11:00</time>
    </datetimePickup>
    <datetimeReturn>
      <date>20-11-2015</date>
      <time>14:00</time>
    </datetimeReturn>
    <collection>
      <latitude>51.50406791565994</latitude>
      <longitude>-0.2167654037475586</longitude>
    </collection>
    <destination>
      <latitude>51.62688886390242</latitude>
      <longitude>0.17994403839111328</longitude>
    </destination>
  </getAjaxData>
</JobFile>

See the table below for;

Tag Format Notes
<username> string Name of User making request (optional)
<getAjaxData> N/A This says the API is requesting some data be returned
<getFor> string This value indicates the data requested is for Vehicles
<setPax> integer

The number of passengers - this determines which vehicles are appropriate - In this case 2 passengers

<datetimePickup> date/time

The date format must be as dd-mm-yyyy and the time as hh:mm using standard 24 hour time - This is needed as the date may have an impact on the price

<datetimeReturn> date/time

This is required where it is a return journey. Do NOT include this tag if the journey is only one way

<collection> float

This is split into longitude and latitude coordinates. You must supply this information - There is currently no API call to get map locations

<destination> float Same rules and format as collection coordinates

Data Returned - Get Vehicle Options:

An example of what is returned from the API is shown below. The code of 200 indicates the call was successful. The count (in this example 3) indicates the number of items or vehicle options available. For each vehicle, the API will also return the luggage options. Note that the Value is an integer and will be used later to either get pricing or insert a job. You will need to supply both the Vehicle and Luggage options when using the API to insert a job.

Callback : {
    "code":200,
    "count":1,
    "data":[
        {
            "value":"2",
            "name":"Executive Saloon Car",
            "short_des": "Typically a Mercedes E Class, Audi A6, Volvo S70 or similar. Arrive in comfort and style, comfortably seats 3-4 passengers, great for short or long journeys.",
            "long_des": "Equipped with Satelite Navigation. Leather Seats,Climate Control, Daily Newspaper/Magazine.",
            "images": [],
            "bag":[ 
              {"value":"23","name":"No luggage."}, 
              {"value":"31","name":"Lap Luggage Only"}, 
              {"value":"22","name":"Hand luggage only."}
            ] 
        } 
      ]
    }