home > support > API > add booking component

Add booking component

Add a Tour (with or without Options) to a booking, or add Options to an existing Tour that is already on a booking.


Bookings should be non-temporary (i.e. should be committed), non-archived.

For use by Tour Operators only. Marketplace Agents cannot add components to an existing booking, instead they should submit a "Modify" booking note, or potentially cancel and re-book.

REST info

ExampleURL: /c/booking/component/new.xml
POST data:
<?xml version="1.0"?>

 Code samples

PHP examples use the PHP Client Library with SimpleXML

Code sample here soon

C# examples use the .Net Client Library

Code sample here soon

VB examples use the .Net Client Library

Code sample here soon

NodeJS examples use the NodeJS Wrapper


// Add a component to a booking
    channelId: 3930,
    booking: {
      booking_id: 12920,
      component: {
        component_key: 'Rjqb+vKn6H5rawI+mt/m56vQ9P6ju1aKv2XO9gZ2OxykgCsUAbrdap/7CTxDKl+p'
    callback: function(response) {

Looking for sample code in a different language? TourCMS and community provided API libraries

 Post fields

Post fields
XML NodeNotes

The root XML element

XML NodeNotes
booking_idThe ID for the booking the component is on
XML NodeNotes
If adding a Tour (with or without Options) a component_key for the component to add, obtained via a call to the Check Tour availability API method.
If adding Options to a Tour component already on the booking, rather than a key pass the text "ADD_OPTION_TO_EXISTING_TOUR" (without quotes)
noteFreetext note for this component. Visible to staff on the booking edit screen and in various reports. Can be multi-line.
If the item being booking is an airport transfer (product type 2) you may well be taking details like hotel names, airlines, flight numbers etc and recording them in a human-readable format. The suggested format for this is:
	Airline : ExampleJet
	Flight  : ABC123
	Arrives : 08:15
	Hotel   : Hotel Testville
pickup_keyIf the customer has chosen/entered a pickup point provide the key (as obtained from Check Tour Availability) here.
If the key is from one of the set list of pickup points then no further pickup information needs to be provided.
Alternatively, if the key is the pickup_on_request_key then you MUST also provide a pickup_note node containing the free-text pickup information entered by the customer otherwise TourCMS will silently ignore the pickup_key.
pickup_noteThe free-text pickup information entered by the customer.
Required if you have passed in a pickup_key node containing the value of the pickup_on_request_key field (from Check Tour Availability, indicating that free-text pickup information is accepted by the operator) otherwise leave this out/blank.
nocommissionWhether any commission should be blocked on the added component
0 - Not flagged as an up-sell (default)
1 - Flagged as an up-sell.

If any Questions are to be answered, add a replies node containing:

XML NodeNotes

A reply node for each question to be answered containing:

XML NodeNotes
Question key identifying the question to be answered, obtained from Check Tour Availability.

An answers node containing:

XML NodeNotes

An answer node for each answer to the question:

XML NodeNotes
The answer

If any Options are to be booked, add an options node containing:

XML NodeNotes

An option node for each option to be added containing:

XML NodeNotes
component_key Either:
If adding at the same time as adding the Tour, provide the component key for the option, obtained from Check Tour Availability.
If adding Option(s) to a Tour component already on the booking, component keys can be obtained via the special Check Option Availability API

Response fields

Response fields
XML NodeNotes
request Confirmation of the request that you sent
error Any error message returned, if there is no error this will just contain the text OK.

More information