This page serves as a brief introduction to the Holiday Extras XML interface for making availability and booking requests.

Requests are made in XML, in the format layed out in the following specs.

The entire XML string should be POSTED in a single field named 'request'.
Your application would do something like:

$str = "<API...>";
$req = "request=".urlencode($str);

... and then send that in an HTTP POST request to the Holiday Extras server. The most common implementation is to use CURL.

Requests are numbered, this tells the system what to expect, availability or booking. The numbers used vary by product/function but bookings are always either a request 4 (intermediary) or a request 5 (agent).

Regardless of the product, making a booking is a two-step process:

Optionally, you can also request extra information about a product from our product library to present to the customer. The product library is part of a different system, for info see below.

Please ignore any requests other than availability and booking in the specs, these are obsolete and the data returned is out of date and unreliable. If you are already using requests 6 or 10, please contact us to discuss moving over to the current product library.

Server address

You should email apisupport@holidayextras.com for the address of our servers.

Once development is complete we will send you the address for live requests. Please notify us that you are ready to move to the live server by emailing the address above.

Product library

To present more detailed information about a specific car park, hotel etc you can access our product library. To do so you will need a key to identify yourselves. This is so we can monitor and throttle usage. Please contact us at apisupport@holidayextras.com to set up a new key.

http://api.holidayextras.co.uk/v1/product/**code**/lite?key=yourkeyhere

Replace **code** with the necessary product code.

eg http://api.holidayextras.co.uk/v1/product/LGW2/lite?key=yourkeyhere

It is also possible to specify the fields you want returned using the fields parameter. If you request a field which does not exist, An error will be returned for each field which does not exist, but other fields which do exist will still be returned.

eg http://api.holidayextras.co.uk/v1/product/LGW2/lite?key=yourkeyhere&fields=name,introduction

The information returned is variable depending on the product. Hotels have different fields to parking and some products of the same type do not have information for every key.

All image paths returned should take 'http://secure.holidayextras.co.uk' as the root.

Common fields/attributes

There are certain attributes in the <API_Request> root node which are common to all products and all requests.

System

For UK products, this is always "ABC". For German products, please use "ABG".

Version

Please always use "1.0" as the value.

Customer

Unless told otherwise, always use a value of "A" for this attribute. If you were originally a BCP customer, please use "B". This is just to help us, it will not affect the results returned.

Session

It is now possible to retrieve the next session number from our API. You should acquire a new session for each customer on your site. This is not intended to be used to track returning users, simply as a mechanism to link availability and booking requests. Once a booking has been made, the session number should be dropped. If that customer wishes to make another booking, please retrieve the next session number. The number retrieved should be included as the Session attribute in the XML here:

<API_Request System="ABC" Version="1.0" Product="CarPark" Customer="A" Session="123456789" RequestCode="1">...

To retrieve a session number, make an HTTP request to:

http://api.holidayextras.co.uk/api/v1/usertoken?key=yourkeyhere

The field <Token> contains the value you want. This makes it a lot easier to trace bookings made by your customers in the event of any problems. If you do not have an API key, please contact us at apisupport@holidayextras.com.

Test bookings

When your application is ready to be deployed, and you have pointed your test environment at our live servers, you will want to make a number of test bookings. If you are an affiliate, obviously you will want these refunded. Please email apisupport@holidayextras.com stating your code, company, booking reference and amount and the booking and all charges will be refunded.

When making test bookings, we ask that you observe the following: