Taxicode API Documentation

Welcome to the Taxicode API

The Taxicode API is a collction of HTTP interfaces to Taxicode services we are opening up to the wider developer platform so that other business can benefit from our vast national taxi company directory and pricing engine.

The main elements of our API are the ability to get quotes, book journeys and perform actions related to the booking made by your application or by authenticated Taxicode users.

Our API is in active developement so if you have any problems or want to suggest a new feature we're always willing to discus with you the options and we'll always endevour to meet your needs if possible. If you wish to contact us, Click Here.

Overview

This section will provide a brief overview of our API and how it works.

Global Parameters

Any API call can specify the following parameters:

Parameter Type Description Value Default
format
optional
GET The format parameter specifies the format that the data response will be sent back in. json, xml, pre, vardump or serialized json
callback
optional
GET If you are requesting json as the data type and wish the data to be sent as jsonp, please specify a callback function and we will wrap the json in that function. String -
encrypted
optional
GET An encrypted JSON string containing data you wish to send to us as POST data. It will be treated as POST data once decrypted on our server. Data should be encrypted using RSA encryption with the public key you can obtain with the Auth API. String -
key
optional
GET/POST Your API key. This is used to verify the source of the API call. Some API calls require the API key and some have additional functionality when it it provided. The max length of this should be 32 characters. Please contact us if you need to discuss this. String -
sub_affiliate
optional
GET/POST A sub affiliate ID that you provide to your customers if you are repackaging our API to your affiliates. String -

Auth API

The Auth API is used to retrieve a public key that can be used to encrypt post data to other API services.

It's primary use is to send encrypted data that you'd normally be able to send via a POST request to our server, but can't because of a limitation on sending POST data such as using jsonp. Once a public key is required you will need to have the ability to do RSA encryption using your public key.

Here are some libraries we're aware of. If you know of any others for different languages please let us know.

Language Library / Function
PHP openssl_public_encrypt
JavaScript https://github.com/ziyan/javascript-rsa

The next step is to convert the data you wish to POST to us via jsonp. Convert the object/array to a json string. Run your encrypt function on the json string. Send a GET variable to the API call you are making with the parameter encrypted=YOUR_ENCRYPTED_JSON_STRING. Our server will decrypt the string with our private key and then treat the json object as POST data.

Request

https://api.taxicode.com/auth/

Example Response

JSON
XML
PRE
VAR DUMP
SERIALIZED
{
	"status":"OK",
	"public_key":"-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA+RqNh\\\/5Zde9mRAGw2Yse\nbvIhvLI\\\/5YFsuTcRdVkaXNFBz15tFLSCNY6ZZ94QoxLUjpfnHzYB4PPVSrQ0DGBq\nqGSfAjQzteljurEZIVHq2EoOoEZFOoieegdYzO07gvxBbew5GtCiR5d3k+Kn6KyV\nEcwknQsDf2VSKZ0zI+oqCQly0ERWcJCIXvcHois9uCtF0CbF3z4\\\/frKoNQIUZuZo\nVmzTjW6UqvMYCFGH4hSGvJ\\\/SdO+3fSCggYQnjD89URe3plLswkllqDjlMl8FBlk2\nRmXoEfdrwekUHHvrMdcHFMtFV9Y355Ky8wbQCXvQT2LJKJr9Xe0L5vt\\\/F\\\/XKAKHF\nrOF5Eazt3ORsd2MNrKzmG6u56Ax+y7hVXZrOM9nST+eMsb+A5rV4Z1sQLmADfX4q\nwoLRwANneh7CRIiJ3NokSfxNIa0T6UskuGiO8qBbX4sMlV5NUIHupfnpwC3Z2YKj\ncuDOkt3ezGq\\\/tf2pNzi86tBMLVjU4pGhKKZidvNLnoLbYZNpyHUiFn7e74AIl7jx\nBS2na8NW2mMP3d2PlVc47tOaGdSW+o0gjnA1jpF3J4tybvi49mN4Muc5yvM75WHX\nLenT6MxeNPG58+VstOv7Lt5+aez6cCogqi4Wh8o5PpQWkUJyn1VhoeM7BxMkOs\\\/h\n+gBW+G\\\/9D0vRRfJdw7OfLLcCAwEAAQ==\n-----END PUBLIC KEY-----\n"
}
<?xml version="1.0" encoding="UTF-8"?>
<TaxicodeResponse>
<status>OK</status> <public_key>-----BEGIN PUBLIC KEY----- MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA+RqNh\/5Zde9mRAGw2Yse bvIhvLI\/5YFsuTcRdVkaXNFBz15tFLSCNY6ZZ94QoxLUjpfnHzYB4PPVSrQ0DGBq qGSfAjQzteljurEZIVHq2EoOoEZFOoieegdYzO07gvxBbew5GtCiR5d3k+Kn6KyV EcwknQsDf2VSKZ0zI+oqCQly0ERWcJCIXvcHois9uCtF0CbF3z4\/frKoNQIUZuZo VmzTjW6UqvMYCFGH4hSGvJ\/SdO+3fSCggYQnjD89URe3plLswkllqDjlMl8FBlk2 RmXoEfdrwekUHHvrMdcHFMtFV9Y355Ky8wbQCXvQT2LJKJr9Xe0L5vt\/F\/XKAKHF rOF5Eazt3ORsd2MNrKzmG6u56Ax+y7hVXZrOM9nST+eMsb+A5rV4Z1sQLmADfX4q woLRwANneh7CRIiJ3NokSfxNIa0T6UskuGiO8qBbX4sMlV5NUIHupfnpwC3Z2YKj cuDOkt3ezGq\/tf2pNzi86tBMLVjU4pGhKKZidvNLnoLbYZNpyHUiFn7e74AIl7jx BS2na8NW2mMP3d2PlVc47tOaGdSW+o0gjnA1jpF3J4tybvi49mN4Muc5yvM75WHX LenT6MxeNPG58+VstOv7Lt5+aez6cCogqi4Wh8o5PpQWkUJyn1VhoeM7BxMkOs\/h +gBW+G\/9D0vRRfJdw7OfLLcCAwEAAQ== -----END PUBLIC KEY----- </public_key> </TaxicodeResponse>
Array
(
    [status] => OK
    [public_key] => -----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA+RqNh\/5Zde9mRAGw2Yse
bvIhvLI\/5YFsuTcRdVkaXNFBz15tFLSCNY6ZZ94QoxLUjpfnHzYB4PPVSrQ0DGBq
qGSfAjQzteljurEZIVHq2EoOoEZFOoieegdYzO07gvxBbew5GtCiR5d3k+Kn6KyV
EcwknQsDf2VSKZ0zI+oqCQly0ERWcJCIXvcHois9uCtF0CbF3z4\/frKoNQIUZuZo
VmzTjW6UqvMYCFGH4hSGvJ\/SdO+3fSCggYQnjD89URe3plLswkllqDjlMl8FBlk2
RmXoEfdrwekUHHvrMdcHFMtFV9Y355Ky8wbQCXvQT2LJKJr9Xe0L5vt\/F\/XKAKHF
rOF5Eazt3ORsd2MNrKzmG6u56Ax+y7hVXZrOM9nST+eMsb+A5rV4Z1sQLmADfX4q
woLRwANneh7CRIiJ3NokSfxNIa0T6UskuGiO8qBbX4sMlV5NUIHupfnpwC3Z2YKj
cuDOkt3ezGq\/tf2pNzi86tBMLVjU4pGhKKZidvNLnoLbYZNpyHUiFn7e74AIl7jx
BS2na8NW2mMP3d2PlVc47tOaGdSW+o0gjnA1jpF3J4tybvi49mN4Muc5yvM75WHX
LenT6MxeNPG58+VstOv7Lt5+aez6cCogqi4Wh8o5PpQWkUJyn1VhoeM7BxMkOs\/h
+gBW+G\/9D0vRRfJdw7OfLLcCAwEAAQ==
-----END PUBLIC KEY-----

)
array(2) {
  ["status"]=>
  string(2) "OK"
  ["public_key"]=>
  string(809) "-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA+RqNh\/5Zde9mRAGw2Yse
bvIhvLI\/5YFsuTcRdVkaXNFBz15tFLSCNY6ZZ94QoxLUjpfnHzYB4PPVSrQ0DGBq
qGSfAjQzteljurEZIVHq2EoOoEZFOoieegdYzO07gvxBbew5GtCiR5d3k+Kn6KyV
EcwknQsDf2VSKZ0zI+oqCQly0ERWcJCIXvcHois9uCtF0CbF3z4\/frKoNQIUZuZo
VmzTjW6UqvMYCFGH4hSGvJ\/SdO+3fSCggYQnjD89URe3plLswkllqDjlMl8FBlk2
RmXoEfdrwekUHHvrMdcHFMtFV9Y355Ky8wbQCXvQT2LJKJr9Xe0L5vt\/F\/XKAKHF
rOF5Eazt3ORsd2MNrKzmG6u56Ax+y7hVXZrOM9nST+eMsb+A5rV4Z1sQLmADfX4q
woLRwANneh7CRIiJ3NokSfxNIa0T6UskuGiO8qBbX4sMlV5NUIHupfnpwC3Z2YKj
cuDOkt3ezGq\/tf2pNzi86tBMLVjU4pGhKKZidvNLnoLbYZNpyHUiFn7e74AIl7jx
BS2na8NW2mMP3d2PlVc47tOaGdSW+o0gjnA1jpF3J4tybvi49mN4Muc5yvM75WHX
LenT6MxeNPG58+VstOv7Lt5+aez6cCogqi4Wh8o5PpQWkUJyn1VhoeM7BxMkOs\/h
+gBW+G\/9D0vRRfJdw7OfLLcCAwEAAQ==
-----END PUBLIC KEY-----
"
}
a:2:{s:6:"status";s:2:"OK";s:10:"public_key";s:809:"-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA+RqNh\/5Zde9mRAGw2Yse
bvIhvLI\/5YFsuTcRdVkaXNFBz15tFLSCNY6ZZ94QoxLUjpfnHzYB4PPVSrQ0DGBq
qGSfAjQzteljurEZIVHq2EoOoEZFOoieegdYzO07gvxBbew5GtCiR5d3k+Kn6KyV
EcwknQsDf2VSKZ0zI+oqCQly0ERWcJCIXvcHois9uCtF0CbF3z4\/frKoNQIUZuZo
VmzTjW6UqvMYCFGH4hSGvJ\/SdO+3fSCggYQnjD89URe3plLswkllqDjlMl8FBlk2
RmXoEfdrwekUHHvrMdcHFMtFV9Y355Ky8wbQCXvQT2LJKJr9Xe0L5vt\/F\/XKAKHF
rOF5Eazt3ORsd2MNrKzmG6u56Ax+y7hVXZrOM9nST+eMsb+A5rV4Z1sQLmADfX4q
woLRwANneh7CRIiJ3NokSfxNIa0T6UskuGiO8qBbX4sMlV5NUIHupfnpwC3Z2YKj
cuDOkt3ezGq\/tf2pNzi86tBMLVjU4pGhKKZidvNLnoLbYZNpyHUiFn7e74AIl7jx
BS2na8NW2mMP3d2PlVc47tOaGdSW+o0gjnA1jpF3J4tybvi49mN4Muc5yvM75WHX
LenT6MxeNPG58+VstOv7Lt5+aez6cCogqi4Wh8o5PpQWkUJyn1VhoeM7BxMkOs\/h
+gBW+G\/9D0vRRfJdw7OfLLcCAwEAAQ==
-----END PUBLIC KEY-----
";}

Booking API

The Booking API allows you to request a quote for a journey and then pay for that journey.

Booking Quote

Quote Request

https://api.taxicode.com/booking/quote/
Parameter Type Description Values Default
pickup GET/POST The pickup location. Either as a string that can be identified by Google Places API or latitude and longiture seperated by a comma. String -
via
optional
GET/POST The via location. Either as a string that can be identified by Google Places API or latitude and longiture seperated by a comma. String -
destination GET/POST The destination location. Either as a string that can be identified by Google Places API or latitude and longiture seperated by a comma. String -
date GET/POST The date and time of the jounrey as a UNIX timestamp. UNIX Timestamp -
return
optional
GET/POST The date and time of the return jounrey as a UNIX timestamp. False if no return journey. UNIX Timestamp false
people
optional
GET/POST The number of people the journey is being booked for. Integer (1-30) 1
key
optional
GET/POST Your API key. This is used to apply any uplift you have attached to your API account. String -
split
optional
GET/POST Should companies be split into multiple results for different vehicle types. Vehicle types are standard, executive and minibuses. Boolean false
other_rates
optional
GET/POST Other rates from other services to include as a comma seperated list. Example: other_rates=blackcab,uber
Currently we only support blackcab and uber, but we will look to add more in the future. They will only be returned if they apply. In the case of Uber and Black Cabs, this means they only apply for journeys that take place in London.
String false
company
optional
GET/POST This will limit results to only show results for a certain company ID. This will return a price for this company even if they wouldn't normally do this job so be careful when using this as jobs that aren't near the company specified are likely to be cancelled. To make sure one result is returned please also use split=0. This specifies that we're not splitting the price into different vehicle types. Integer null
instances
optional
GET/POST This will limit results to only show results for a certain instance IDs. This will return a price for this instance even if they wouldn't normally do this job so be careful when using this as jobs that aren't near the instance specified are likely to be cancelled. Results from the same company (that has multiple instances) will only show the best price for that company. Please be aware of the use of the split parameter. String Comma seperated list of instances IDs to get a price from.

Quote Response

Once you've made your request you will recieve back two objects:

A Journey object which confirms the details that were entered in the request.

A quotes object that contains quotes containing information about the company, price and different options availale. The quotes object is keyed with quote IDs which will be stored by our servers for 24-48 hours before being deleted. You will use this quote ID if you wish to book the quoted journey.

The Response
status OK Everything is okay.
WARNING If quotes can be returned but they can't be booked.
ERROR If there was an error and no quotes returned.
warning String If status is WARNING this will contain the warning message.
error String If status is ERROR this will contain the error message.
journey_id String The ID of the journey. Can be used to look up journey after it's been booked (stored for 1 month after booking made). This is mainly used to with the booking/journey API function to refill a users form if you don't have it stored.
payment_url String The URL to send the user to if you are not handling the payment yourself. This url needs the quote being booked appened to it followed by any other variable.

Example: https://secure.taxicode.com/api/QUOTE_ID/?callback=http://www.example.com&v=1&key=YOUR_API_KEY

journey Object
quotes false No quotes found
Object
Object containing Quote IDs as the keys and Quote Objects as values.
other_rates Array An array of Objects if other_rates is set, this will include the rates we were able to calculate with the rate type as the key and the details inside an object. Example rate:
card Array An array of card objects that are supported for payment and what the card fee is if applicable. This is used to show customers what they will be paying if they select to pay by card. (Logged in users can pay by cash or balance if they have an account balance AND the booking doesn't have an affiliate uplift applied to it.)
numbers Array An array of taxi numbers for nearby taxi companies that aren't part of Taxicode.

Quote Example Response

JSON
XML
PRE
VAR DUMP
SERIALIZED
{
	"status":"OK",
	"journey":{
		"pickup":{
			"position":[
				51.501737,
				-0.108588
			],
			"postcode":"SE1",
			"string":"Waterloo, London, United Kingdom"
		},
		"via":false,
		"destination":{
			"position":[
				51.4700223,
				-0.4542955
			],
			"postcode":"TW6 1BP",
			"string":"Heathrow Airport, London Borough of Hillingdon, United Kingdom"
		},
		"date":1390827533,
		"return":false,
		"people":3
	},
	"quotes":{
		"QUOTE_8DA3D4C97E":{
			"company_name":"Web3r",
			"company_id":1,
			"company_location":"Waterloo",
			"company_phone":"01234 567 890",
			"price":24.6,
			"meetandgreet":false,
			"rating":{
				"ratings":7,
				"score":4.6
			},
			"vehicles":[
				{
					"price":24.6,
					"meetandgreet_price":24.6,
					"name":"Saloon Car",
					"image":"https:\/\/c322950.ssl.cf1.rackcdn.com\/garage_img_1296126441.jpg",
					"passengers":4,
					"big_luggage":2,
					"small_luggage":2
				},
				{
					"price":29.6,
					"meetandgreet_price":29.6,
					"name":"Mercedes Viano",
					"image":"https:\/\/c322950.ssl.cf1.rackcdn.com\/garage_img_1309878504.png",
					"passengers":5,
					"big_luggage":5,
					"small_luggage":5
				}
			]
		},
		"QUOTE_93760FA8FD":"..."
	}
}
<?xml version="1.0" encoding="UTF-8"?>
<TaxicodeResponse>
<status>OK</status> <journey> <pickup> <position> <element value='0'>51.501737</element> <element value='1'>-0.108588</element> </position> <postcode>SE1</postcode> <string>Waterloo, London, United Kingdom</string> </pickup> <via></via> <destination> <position> <element value='0'>51.4700223</element> <element value='1'>-0.4542955</element> </position> <postcode>TW6 1BP</postcode> <string>Heathrow Airport, London Borough of Hillingdon, United Kingdom</string> </destination> <date>1390827533</date> <return></return> <people>3</people> </journey> <quotes> <QUOTE_8DA3D4C97E> <company_name>Web3r</company_name> <company_id>1</company_id> <company_location>Waterloo</company_location> <company_phone>01234 567 890</company_phone> <price>24.6</price> <meetandgreet></meetandgreet> <rating> <ratings>7</ratings> <score>4.6</score> </rating> <vehicles> <element value='0'> <price>24.6</price> <meetandgreet_price>24.6</meetandgreet_price> <name>Saloon Car</name> <image>https://c322950.ssl.cf1.rackcdn.com/garage_img_1296126441.jpg</image> <passengers>4</passengers> <big_luggage>2</big_luggage> <small_luggage>2</small_luggage> </element> <element value='1'> <price>29.6</price> <meetandgreet_price>29.6</meetandgreet_price> <name>Mercedes Viano</name> <image>https://c322950.ssl.cf1.rackcdn.com/garage_img_1309878504.png</image> <passengers>5</passengers> <big_luggage>5</big_luggage> <small_luggage>5</small_luggage> </element> </vehicles> </QUOTE_8DA3D4C97E> <QUOTE_93760FA8FD>...</QUOTE_93760FA8FD> </quotes> </TaxicodeResponse>
Array
(
    [status] => OK
    [journey] => Array
        (
            [pickup] => Array
                (
                    [position] => Array
                        (
                            [0] => 51.501737
                            [1] => -0.108588
                        )

                    [postcode] => SE1
                    [string] => Waterloo, London, United Kingdom
                )

            [via] => 
            [destination] => Array
                (
                    [position] => Array
                        (
                            [0] => 51.4700223
                            [1] => -0.4542955
                        )

                    [postcode] => TW6 1BP
                    [string] => Heathrow Airport, London Borough of Hillingdon, United Kingdom
                )

            [date] => 1390827533
            [return] => 
            [people] => 3
        )

    [quotes] => Array
        (
            [QUOTE_8DA3D4C97E] => Array
                (
                    [company_name] => Web3r
                    [company_id] => 1
                    [company_location] => Waterloo
                    [company_phone] => 01234 567 890
                    [price] => 24.6
                    [meetandgreet] => 
                    [rating] => Array
                        (
                            [ratings] => 7
                            [score] => 4.6
                        )

                    [vehicles] => Array
                        (
                            [0] => Array
                                (
                                    [price] => 24.6
                                    [meetandgreet_price] => 24.6
                                    [name] => Saloon Car
                                    [image] => https://c322950.ssl.cf1.rackcdn.com/garage_img_1296126441.jpg
                                    [passengers] => 4
                                    [big_luggage] => 2
                                    [small_luggage] => 2
                                )

                            [1] => Array
                                (
                                    [price] => 29.6
                                    [meetandgreet_price] => 29.6
                                    [name] => Mercedes Viano
                                    [image] => https://c322950.ssl.cf1.rackcdn.com/garage_img_1309878504.png
                                    [passengers] => 5
                                    [big_luggage] => 5
                                    [small_luggage] => 5
                                )

                        )

                )

            [QUOTE_93760FA8FD] => ...
        )

)
array(3) {
  ["status"]=>
  string(2) "OK"
  ["journey"]=>
  array(6) {
    ["pickup"]=>
    array(3) {
      ["position"]=>
      array(2) {
        [0]=>
        float(51.501737)
        [1]=>
        float(-0.108588)
      }
      ["postcode"]=>
      string(3) "SE1"
      ["string"]=>
      string(32) "Waterloo, London, United Kingdom"
    }
    ["via"]=>
    bool(false)
    ["destination"]=>
    array(3) {
      ["position"]=>
      array(2) {
        [0]=>
        float(51.4700223)
        [1]=>
        float(-0.4542955)
      }
      ["postcode"]=>
      string(7) "TW6 1BP"
      ["string"]=>
      string(62) "Heathrow Airport, London Borough of Hillingdon, United Kingdom"
    }
    ["date"]=>
    int(1390827533)
    ["return"]=>
    bool(false)
    ["people"]=>
    int(3)
  }
  ["quotes"]=>
  array(2) {
    ["QUOTE_8DA3D4C97E"]=>
    array(8) {
      ["company_name"]=>
      string(5) "Web3r"
      ["company_id"]=>
      int(1)
      ["company_location"]=>
      string(8) "Waterloo"
      ["company_phone"]=>
      string(13) "01234 567 890"
      ["price"]=>
      float(24.6)
      ["meetandgreet"]=>
      bool(false)
      ["rating"]=>
      array(2) {
        ["ratings"]=>
        int(7)
        ["score"]=>
        float(4.6)
      }
      ["vehicles"]=>
      array(2) {
        [0]=>
        array(7) {
          ["price"]=>
          float(24.6)
          ["meetandgreet_price"]=>
          float(24.6)
          ["name"]=>
          string(10) "Saloon Car"
          ["image"]=>
          string(61) "https://c322950.ssl.cf1.rackcdn.com/garage_img_1296126441.jpg"
          ["passengers"]=>
          int(4)
          ["big_luggage"]=>
          int(2)
          ["small_luggage"]=>
          int(2)
        }
        [1]=>
        array(7) {
          ["price"]=>
          float(29.6)
          ["meetandgreet_price"]=>
          float(29.6)
          ["name"]=>
          string(14) "Mercedes Viano"
          ["image"]=>
          string(61) "https://c322950.ssl.cf1.rackcdn.com/garage_img_1309878504.png"
          ["passengers"]=>
          int(5)
          ["big_luggage"]=>
          int(5)
          ["small_luggage"]=>
          int(5)
        }
      }
    }
    ["QUOTE_93760FA8FD"]=>
    string(3) "..."
  }
}
a:3:{s:6:"status";s:2:"OK";s:7:"journey";a:6:{s:6:"pickup";a:3:{s:8:"position";a:2:{i:0;d:51.501736999999999;i:1;d:-0.108588;}s:8:"postcode";s:3:"SE1";s:6:"string";s:32:"Waterloo, London, United Kingdom";}s:3:"via";b:0;s:11:"destination";a:3:{s:8:"position";a:2:{i:0;d:51.470022299999997;i:1;d:-0.45429550000000002;}s:8:"postcode";s:7:"TW6 1BP";s:6:"string";s:62:"Heathrow Airport, London Borough of Hillingdon, United Kingdom";}s:4:"date";i:1390827533;s:6:"return";b:0;s:6:"people";i:3;}s:6:"quotes";a:2:{s:16:"QUOTE_8DA3D4C97E";a:8:{s:12:"company_name";s:5:"Web3r";s:10:"company_id";i:1;s:16:"company_location";s:8:"Waterloo";s:13:"company_phone";s:13:"01234 567 890";s:5:"price";d:24.600000000000001;s:12:"meetandgreet";b:0;s:6:"rating";a:2:{s:7:"ratings";i:7;s:5:"score";d:4.5999999999999996;}s:8:"vehicles";a:2:{i:0;a:7:{s:5:"price";d:24.600000000000001;s:18:"meetandgreet_price";d:24.600000000000001;s:4:"name";s:10:"Saloon Car";s:5:"image";s:61:"https://c322950.ssl.cf1.rackcdn.com/garage_img_1296126441.jpg";s:10:"passengers";i:4;s:11:"big_luggage";i:2;s:13:"small_luggage";i:2;}i:1;a:7:{s:5:"price";d:29.600000000000001;s:18:"meetandgreet_price";d:29.600000000000001;s:4:"name";s:14:"Mercedes Viano";s:5:"image";s:61:"https://c322950.ssl.cf1.rackcdn.com/garage_img_1309878504.png";s:10:"passengers";i:5;s:11:"big_luggage";i:5;s:13:"small_luggage";i:5;}}}s:16:"QUOTE_93760FA8FD";s:3:"...";}}

Booking Pay

Pay Request

https://api.taxicode.com/booking/pay/
Parameter Type Description Values Default
quote POST The Quote ID that was provided by the Booking Quote Class. String -
vehicle
optional
POST The vehicle ID for the vehicle being selected as provided as provided as they key of the vehicle array. Integer 0
meetandgreet
optional
POST If an optional meet and greet charge is available this represents whether the customer has accepted that cost. Boolean false
method
optional
POST The payment option selected. Possible payment options sent through quote response as array. Please note that all quotes can be paid for by card, some quotes can be made as a cash booking if a user is authenticated, other payment options may be made available in the future. authorised_payment_handler, card or cash card
key
optional
POST Your API key so we can charge any affiliate uplift and attribute the booking to you. String -
test
optional
GET/POST Whether this is a test booking or not. test=1 means the booking will not be sent to the actual company and will be stored on a special testing company once it's been paid for. test=0 or not setting it processes the booking a live booking that goes to a taxi company. When setting test=1 the payment uses SagePay's testing servers so you may enter any test card details for sagepay. 1 or 0 0
Customer Details - Required if user is not currently logged in.
name POST The name of the customer. String -
email POST The email address of the customer for notifications about the booking progress. String -
telephone POST Customers telephone number. Used to allow taxi company to contact customer if needed and notify them when they are nearby. String -
Card Payment Details - Following all required if 'card' (or no) payment option selected.
card_cardholder POST The card holders name. Must be the same as the String -
card_type POST The card type. VISA (Visa Credit),
DELTA (Visa Debit),
UKE (Visa Electron),
MC (MasterCard),
MAESTRO (Maestro) or
AMEX (American Express)
-
card_number POST The number printed on the front of the card. -
card_start
optional
POST The start date of the card. Only for Maestro cards. Month year as: MMYY -
card_expiry POST The expiry date of the card.. Month year as: MMYY -
card_issue
optional
POST The issue number of the card. Only for Maestro cards. Integer -
card_cv2 POST The last 3 digits on the back of the signature strip on the card. String -
card_address1 POST The first line of the billing address. String -
card_address2
optional
POST The second line of the billing address. String -
city POST The town or city of the billing address. String -
postcode POST The postcode or zipcode of the billing address. String -
country
optional
POST The 2 letter ISO 3166-1 country code of the billing address. String GB
state
optional
POST The 2 letter state code for each as defined by ISO 3166-2:US. Only needed is country is US. String -

Pay Response

The Response
status OK Everything is okay.
ERROR The payment could not be taken. Error messages will be provided in the errors array.
FAILED The payment could not be taken. Error messages will be provided in the errors array.
error Array If status is ERROR or FAILED this will contain an array of error messages.
booking String If status is OK this will contain the booking reference. This means the bookings has been made.
bank_url String A URL to forward the customer to if they need to 3D secure the transation. Currently no transation will be 3D secured, but this will be introduced at a later point.

Pay Example Response

JSON
XML
PRE
VAR DUMP
SERIALIZED
{
	"status":"OK",
	"booking":"TC22E97643"
}
<?xml version="1.0" encoding="UTF-8"?>
<TaxicodeResponse>
<status>OK</status> <booking>TC22E97643</booking> </TaxicodeResponse>
Array
(
    [status] => OK
    [booking] => TC22E97643
)
array(2) {
  ["status"]=>
  string(2) "OK"
  ["booking"]=>
  string(10) "TC22E97643"
}
a:2:{s:6:"status";s:2:"OK";s:7:"booking";s:10:"TC22E97643";}

Booking Journey

Journey Request

https://api.taxicode.com/booking/journey/
Parameter Type Description Values Default
id POST The ID of the journey as provided by booking/quote. String -

Journey Response

The Response
status OK Everything is okay.
ERROR If there was an error and no quotes returned.
error String If status is ERROR this will contain the error message.
journey Object The journey object as it was sent to the booking/quote API.

Booking State

The booking/state API gets the current status of a booking or list of bookings. If you need more information on a booking you can use the booking/details which is part of the affiliate API.

State Request

https://api.taxicode.com/booking/state/
Parameter Type Description Values Default
booking GET / POST The booking reference (Example: TC12312312) of a booking. String -
A comma seperated list of booking references. String -

State Response

The Response
status OK Everything is okay.
ERROR If there was an error and no quotes returned.
error String If status is ERROR this will contain the error message.
bookings Object List of bookings statues with booking reference as key and booking object as value.
JSON
XML
PRE
VAR DUMP
SERIALIZED
{
	"status":"OK",
	"bookings":{
		"TC12312312":{
			"status":"Unconfirmed",
			"company_name":"ABC Taxis",
			"company_telephone":"01234 567890"
		},
		"...":"..."
	}
}
<?xml version="1.0" encoding="UTF-8"?>
<TaxicodeResponse>
<status>OK</status> <bookings> <TC12312312> <status>Unconfirmed</status> <company_name>ABC Taxis</company_name> <company_telephone>01234 567890</company_telephone> </TC12312312> <...>...</...> </bookings> </TaxicodeResponse>
Array
(
    [status] => OK
    [bookings] => Array
        (
            [TC12312312] => Array
                (
                    [status] => Unconfirmed
                    [company_name] => ABC Taxis
                    [company_telephone] => 01234 567890
                )

            [...] => ...
        )

)
array(2) {
  ["status"]=>
  string(2) "OK"
  ["bookings"]=>
  array(2) {
    ["TC12312312"]=>
    array(3) {
      ["status"]=>
      string(11) "Unconfirmed"
      ["company_name"]=>
      string(9) "ABC Taxis"
      ["company_telephone"]=>
      string(12) "01234 567890"
    }
    ["..."]=>
    string(3) "..."
  }
}
a:2:{s:6:"status";s:2:"OK";s:8:"bookings";a:2:{s:10:"TC12312312";a:3:{s:6:"status";s:11:"Unconfirmed";s:12:"company_name";s:9:"ABC Taxis";s:17:"company_telephone";s:12:"01234 567890";}s:3:"...";s:3:"...";}}

Booking Resend

The booking/resend allows you to request for a booking confirmation email to be resent to the customer.

Resend Request

https://api.taxicode.com/booking/resend/
Parameter Type Description Values Default
booking POST The booking reference (Example: TC12312312) of a booking. String -

Resend Response

The Response
status OK Everything is okay and the resend request was successful.
ERROR If there was an error and no quotes returned.
error String If status is ERROR this will contain the error message.
JSON
XML
PRE
VAR DUMP
SERIALIZED
{
	"status":"OK"
}
<?xml version="1.0" encoding="UTF-8"?>
<TaxicodeResponse>
<status>OK</status> </TaxicodeResponse>
Array
(
    [status] => OK
)
array(1) {
  ["status"]=>
  string(2) "OK"
}
a:1:{s:6:"status";s:2:"OK";}

Booking Cancel

The booking/cancel allows you to request for a booking to be cancelled on behalf of the customer. This must be done 24 hours before the outward journey is due to take place otherwise it is recommened you get the customer to contact the provider directly.

Resend Request

https://api.taxicode.com/booking/resend/
Parameter Type Description Values Default
booking GET/POST The booking reference (Example: TC12312312) of a booking. String -
key GET/POST Your API key. Must be the API key the booking was made with. String -
secret GET/POST Your secret API key. Must match the API key the booking was made with.
Warning
This must be sent by your server, not by a client side API request for example through an APP or via javascript on a webpage. If this is how your application works please make your application make this request to your server where you can then add the secret key to the request to our API so your secret key is not exposed.
String -

Resend Response

The Response
status OK Everything is okay and the resend request was successful.
ERROR If there was an error and no quotes returned.
error String If status is ERROR this will contain the error message.
JSON
XML
PRE
VAR DUMP
SERIALIZED
{
	"status":"OK"
}
<?xml version="1.0" encoding="UTF-8"?>
<TaxicodeResponse>
<status>OK</status> </TaxicodeResponse>
Array
(
    [status] => OK
)
array(1) {
  ["status"]=>
  string(2) "OK"
}
a:1:{s:6:"status";s:2:"OK";}

Affiliate API

The Affiliate API allows you to review your affiliate account and bookings made with your affiliate account.
All calls to the Affiliate API require your API secret key and your API key. They should only be sent securely by your server to the Taxicode API server so that your secret key is not exposed. If your secret key is exposed to users, you should contact us requesting a new secret key.

Affiliate Details

Affiliate Details Request

https://api.taxicode.com/affiliate/
Parameter Type Description Values Default
key POST/GET Your API Key. String -
secret POST/GET Your secret key. String -

Affiliate Details Response

Once you've made your request you will recieve back to objects:

The Response
status OK Everything is okay.
ERROR If there was an error and no details can be returned.
error String If status is ERROR this will contain the error message.
affiliate Object

Affiliate Details Response

JSON
XML
PRE
VAR DUMP
SERIALIZED
{
	"status":"OK",
	"affiliate":{
		"title":"Top Airport Taxis",
		"image":"http:\/\/www.topairporttaxis.co.uk\/imgs\/compare\/topairporttaxis\/logo_white.png",
		"colour1":"098972",
		"colour2":"FFFFFF",
		"link":"http:\/\/www.topairporttaxis.co.uk\/"
	}
}
<?xml version="1.0" encoding="UTF-8"?>
<TaxicodeResponse>
<status>OK</status> <affiliate> <title>Top Airport Taxis</title> <image>http://www.topairporttaxis.co.uk/imgs/compare/topairporttaxis/logo_white.png</image> <colour1>098972</colour1> <colour2>FFFFFF</colour2> <link>http://www.topairporttaxis.co.uk/</link> </affiliate> </TaxicodeResponse>
Array
(
    [status] => OK
    [affiliate] => Array
        (
            [title] => Top Airport Taxis
            [image] => http://www.topairporttaxis.co.uk/imgs/compare/topairporttaxis/logo_white.png
            [colour1] => 098972
            [colour2] => FFFFFF
            [link] => http://www.topairporttaxis.co.uk/
        )

)
array(2) {
  ["status"]=>
  string(2) "OK"
  ["affiliate"]=>
  array(5) {
    ["title"]=>
    string(17) "Top Airport Taxis"
    ["image"]=>
    string(76) "http://www.topairporttaxis.co.uk/imgs/compare/topairporttaxis/logo_white.png"
    ["colour1"]=>
    string(6) "098972"
    ["colour2"]=>
    string(6) "FFFFFF"
    ["link"]=>
    string(33) "http://www.topairporttaxis.co.uk/"
  }
}
a:2:{s:6:"status";s:2:"OK";s:9:"affiliate";a:5:{s:5:"title";s:17:"Top Airport Taxis";s:5:"image";s:76:"http://www.topairporttaxis.co.uk/imgs/compare/topairporttaxis/logo_white.png";s:7:"colour1";s:6:"098972";s:7:"colour2";s:6:"FFFFFF";s:4:"link";s:33:"http://www.topairporttaxis.co.uk/";}}

Affiliate Earnings

Affiliate Earnings Request

https://api.taxicode.com/affiliate/earnings/
Parameter Type Description Values Default
key POST/GET Your API Key. String -
secret POST/GET Your secret key. String -

Affiliate Earnings Response

Once you've made your request you will recieve back to objects:

The Response
status OK Everything is okay.
ERROR If there was an error and no earnings data can be returned.
error String If status is ERROR this will contain the error message.
earnings Object A list of years (YYYY) containing a list of months (MM) containing a list of bookings and the value they earned the affiliate.

Affiliate Earnings Response

JSON
XML
PRE
VAR DUMP
SERIALIZED
{
	"status":"OK",
	"earnings":{
		"2014":{
			"12":{
				"TC12345676":27.01,
				"TC12345677":6.23
			}
		},
		"2015":{
			"01":{
				"TC12345678":1.36,
				"TC12345679":1.5,
				"TC12345680":4.23
			},
			"02":{
				"TC12345681":10.6,
				"TC12345682":9.85,
				"TC12345683":7.57,
				"TC12345684":4.23
			}
		}
	}
}
<?xml version="1.0" encoding="UTF-8"?>
<TaxicodeResponse>
<status>OK</status> <earnings> <element value='2014'> <element value='12'> <TC12345676>27.01</TC12345676> <TC12345677>6.23</TC12345677> </element> </element> <element value='2015'> <element value='01'> <TC12345678>1.36</TC12345678> <TC12345679>1.5</TC12345679> <TC12345680>4.23</TC12345680> </element> <element value='02'> <TC12345681>10.6</TC12345681> <TC12345682>9.85</TC12345682> <TC12345683>7.57</TC12345683> <TC12345684>4.23</TC12345684> </element> </element> </earnings> </TaxicodeResponse>
Array
(
    [status] => OK
    [earnings] => Array
        (
            [2014] => Array
                (
                    [12] => Array
                        (
                            [TC12345676] => 27.01
                            [TC12345677] => 6.23
                        )

                )

            [2015] => Array
                (
                    [01] => Array
                        (
                            [TC12345678] => 1.36
                            [TC12345679] => 1.5
                            [TC12345680] => 4.23
                        )

                    [02] => Array
                        (
                            [TC12345681] => 10.6
                            [TC12345682] => 9.85
                            [TC12345683] => 7.57
                            [TC12345684] => 4.23
                        )

                )

        )

)
array(2) {
  ["status"]=>
  string(2) "OK"
  ["earnings"]=>
  array(2) {
    [2014]=>
    array(1) {
      [12]=>
      array(2) {
        ["TC12345676"]=>
        float(27.01)
        ["TC12345677"]=>
        float(6.23)
      }
    }
    [2015]=>
    array(2) {
      ["01"]=>
      array(3) {
        ["TC12345678"]=>
        float(1.36)
        ["TC12345679"]=>
        float(1.5)
        ["TC12345680"]=>
        float(4.23)
      }
      ["02"]=>
      array(4) {
        ["TC12345681"]=>
        float(10.6)
        ["TC12345682"]=>
        float(9.85)
        ["TC12345683"]=>
        float(7.57)
        ["TC12345684"]=>
        float(4.23)
      }
    }
  }
}
a:2:{s:6:"status";s:2:"OK";s:8:"earnings";a:2:{i:2014;a:1:{i:12;a:2:{s:10:"TC12345676";d:27.010000000000002;s:10:"TC12345677";d:6.2300000000000004;}}i:2015;a:2:{s:2:"01";a:3:{s:10:"TC12345678";d:1.3600000000000001;s:10:"TC12345679";d:1.5;s:10:"TC12345680";d:4.2300000000000004;}s:2:"02";a:4:{s:10:"TC12345681";d:10.6;s:10:"TC12345682";d:9.8499999999999996;s:10:"TC12345683";d:7.5700000000000003;s:10:"TC12345684";d:4.2300000000000004;}}}}

Affiliate Payment Due

If you are an authorised payment handler you will be due to make payments for bookings made through our API once the provider has confirmed the job was completed. We will contact you weekly to confirm the bookings that need to be paid, but you can use this API call to look up the current amount due. This will also help you automate this process. You will still need to email accounts@web3r.co.uk once you have paid with a list of booking references you have paid.

Affiliate Payment Due Request

https://api.taxicode.com/affiliate/payment_due/
Parameter Type Description Values Default
key POST/GET Your API Key. String -
secret POST/GET Your secret key. String -

Affiliate Payment Due Response

Once you've made your request you will recieve back to objects:

The Response
status OK Everything is okay.
ERROR If there was an error and no earnings data can be returned.
error String If status is ERROR this will contain the error message.
bookings Array Array of objects for bookings that payment is due for:
total Float The total amount due.

Affiliate Earnings Response

JSON
XML
PRE
VAR DUMP
SERIALIZED
{
	"status":"OK",
	"bookings":[
		{
			"booking":"TC12345680",
			"value":24.62,
			"name":"John Smith",
			"created":"2015-07-20 12:32:02"
		},
		{
			"booking":"TC12345680",
			"value":54.2,
			"name":"Sarah Jones",
			"created":"2015-07-28 08:58:12"
		}
	],
	"total":78.82
}
<?xml version="1.0" encoding="UTF-8"?>
<TaxicodeResponse>
<status>OK</status> <bookings> <element value='0'> <booking>TC12345680</booking> <value>24.62</value> <name>John Smith</name> <created>2015-07-20 12:32:02</created> </element> <element value='1'> <booking>TC12345680</booking> <value>54.2</value> <name>Sarah Jones</name> <created>2015-07-28 08:58:12</created> </element> </bookings> <total>78.82</total> </TaxicodeResponse>
Array
(
    [status] => OK
    [bookings] => Array
        (
            [0] => Array
                (
                    [booking] => TC12345680
                    [value] => 24.62
                    [name] => John Smith
                    [created] => 2015-07-20 12:32:02
                )

            [1] => Array
                (
                    [booking] => TC12345680
                    [value] => 54.2
                    [name] => Sarah Jones
                    [created] => 2015-07-28 08:58:12
                )

        )

    [total] => 78.82
)
array(3) {
  ["status"]=>
  string(2) "OK"
  ["bookings"]=>
  array(2) {
    [0]=>
    array(4) {
      ["booking"]=>
      string(10) "TC12345680"
      ["value"]=>
      float(24.62)
      ["name"]=>
      string(10) "John Smith"
      ["created"]=>
      string(19) "2015-07-20 12:32:02"
    }
    [1]=>
    array(4) {
      ["booking"]=>
      string(10) "TC12345680"
      ["value"]=>
      float(54.2)
      ["name"]=>
      string(11) "Sarah Jones"
      ["created"]=>
      string(19) "2015-07-28 08:58:12"
    }
  }
  ["total"]=>
  float(78.82)
}
a:3:{s:6:"status";s:2:"OK";s:8:"bookings";a:2:{i:0;a:4:{s:7:"booking";s:10:"TC12345680";s:5:"value";d:24.620000000000001;s:4:"name";s:10:"John Smith";s:7:"created";s:19:"2015-07-20 12:32:02";}i:1;a:4:{s:7:"booking";s:10:"TC12345680";s:5:"value";d:54.200000000000003;s:4:"name";s:11:"Sarah Jones";s:7:"created";s:19:"2015-07-28 08:58:12";}}s:5:"total";d:78.820000000000007;}

Affiliate Booking Details

Affiliate Booking Details Request

https://api.taxicode.com/booking/details/
Parameter Type Description Values Default
key POST/GET Your API Key. String -
secret POST/GET Your secret key. String -
id POST/GET Your ID of the booking (Example: TC12312312) String -

Affiliate Booking Details Response

Once you've made your request you will recieve back to objects:

The Response
status OK Everything is okay.
ERROR If there was an error and no booking details can be returned.
error String If status is ERROR this will contain the error message.
booking Object See example below.

Affiliate Earnings Response

JSON
XML
PRE
VAR DUMP
SERIALIZED
{
	"status":"OK",
	"booking":{
		"reference":"TC12312312",
		"date":"2015-01-07 16:30:00",
		"return":false,
		"pickup":{
			"string":"Fleet, Hampshire, GU51",
			"position":[
				51.2864,
				-0.839153
			],
			"postcode":"GU51"
		},
		"destination":{
			"string":"Aldershot, Hampshire, GU51",
			"position":[
				51.2554,
				-0.767322
			],
			"postcode":"GU11"
		},
		"price":13.64,
		"distance":5,
		"people":1,
		"company_name":"Taxi Company Name",
		"company_number":"01234 567890",
		"status":"Unconfirmed"
	}
}
<?xml version="1.0" encoding="UTF-8"?>
<TaxicodeResponse>
<status>OK</status> <booking> <reference>TC12312312</reference> <date>2015-01-07 16:30:00</date> <return></return> <pickup> <string>Fleet, Hampshire, GU51</string> <position> <element value='0'>51.2864</element> <element value='1'>-0.839153</element> </position> <postcode>GU51</postcode> </pickup> <destination> <string>Aldershot, Hampshire, GU51</string> <position> <element value='0'>51.2554</element> <element value='1'>-0.767322</element> </position> <postcode>GU11</postcode> </destination> <price>13.64</price> <distance>5</distance> <people>1</people> <company_name>Taxi Company Name</company_name> <company_number>01234 567890</company_number> <status>Unconfirmed</status> </booking> </TaxicodeResponse>
Array
(
    [status] => OK
    [booking] => Array
        (
            [reference] => TC12312312
            [date] => 2015-01-07 16:30:00
            [return] => 
            [pickup] => Array
                (
                    [string] => Fleet, Hampshire, GU51
                    [position] => Array
                        (
                            [0] => 51.2864
                            [1] => -0.839153
                        )

                    [postcode] => GU51
                )

            [destination] => Array
                (
                    [string] => Aldershot, Hampshire, GU51
                    [position] => Array
                        (
                            [0] => 51.2554
                            [1] => -0.767322
                        )

                    [postcode] => GU11
                )

            [price] => 13.64
            [distance] => 5
            [people] => 1
            [company_name] => Taxi Company Name
            [company_number] => 01234 567890
            [status] => Unconfirmed
        )

)
array(2) {
  ["status"]=>
  string(2) "OK"
  ["booking"]=>
  array(11) {
    ["reference"]=>
    string(10) "TC12312312"
    ["date"]=>
    string(19) "2015-01-07 16:30:00"
    ["return"]=>
    bool(false)
    ["pickup"]=>
    array(3) {
      ["string"]=>
      string(22) "Fleet, Hampshire, GU51"
      ["position"]=>
      array(2) {
        [0]=>
        float(51.2864)
        [1]=>
        float(-0.839153)
      }
      ["postcode"]=>
      string(4) "GU51"
    }
    ["destination"]=>
    array(3) {
      ["string"]=>
      string(26) "Aldershot, Hampshire, GU51"
      ["position"]=>
      array(2) {
        [0]=>
        float(51.2554)
        [1]=>
        float(-0.767322)
      }
      ["postcode"]=>
      string(4) "GU11"
    }
    ["price"]=>
    float(13.64)
    ["distance"]=>
    int(5)
    ["people"]=>
    int(1)
    ["company_name"]=>
    string(17) "Taxi Company Name"
    ["company_number"]=>
    string(12) "01234 567890"
    ["status"]=>
    string(11) "Unconfirmed"
  }
}
a:2:{s:6:"status";s:2:"OK";s:7:"booking";a:11:{s:9:"reference";s:10:"TC12312312";s:4:"date";s:19:"2015-01-07 16:30:00";s:6:"return";b:0;s:6:"pickup";a:3:{s:6:"string";s:22:"Fleet, Hampshire, GU51";s:8:"position";a:2:{i:0;d:51.2864;i:1;d:-0.83915300000000004;}s:8:"postcode";s:4:"GU51";}s:11:"destination";a:3:{s:6:"string";s:26:"Aldershot, Hampshire, GU51";s:8:"position";a:2:{i:0;d:51.255400000000002;i:1;d:-0.76732199999999995;}s:8:"postcode";s:4:"GU11";}s:5:"price";d:13.640000000000001;s:8:"distance";i:5;s:6:"people";i:1;s:12:"company_name";s:17:"Taxi Company Name";s:14:"company_number";s:12:"01234 567890";s:6:"status";s:11:"Unconfirmed";}}