TourCMS, a leading online booking and channel management solution is operated by Palisis.

Contact Info

Palisis AG
Florastrasse 18A
8610 Uster
support@palisis.com
+41 44 533 40 40

Follow Us

home > support > API > booking creation > commit new booking

Commit new booking

Convert a temporary booking created with Start new booking into a live booking

Notes

Only returns basic booking information, use the booking_id and Show Booking to get full detail.

Once committed a booking can no longer be deleted, it can however be cancelled which returns the availability but leaves a cancelled booking in the operator account. Cancelled bookings can be deleted by staff via the TourCMS system web interface.

REST info

Endpoint/c/booking/new/commit
FormatsXML
ExampleURL: /c/booking/new/commit.xml
 
POST data:
<?xml version="1.0"?>
<booking>
	<booking_id>12345</booking_id>
</booking>
VerbPOST

Code samples

PHP examples use the PHP Client Library with SimpleXML

Description

object commit_new_booking ( SimpleXmlElement $booking_data, int $channel )


Parameters

$booking_data
SimpleXmlElement containing the booking data (ID)
$channel
ID number for the channel the booking is being made with

Example

// Temporary booking ID (obtained via "Start booking")
$booking_id = 123456;

// Channel the booking is made with
$channel = 3039;

// Build the XML to post to TourCMS
$booking = new SimpleXMLElement('<booking />');
$booking->addChild('booking_id', $booking_id);

// Query the TourCMS API, upgrading the booking from temporary to live
$result = $tourcms->commit_new_booking($booking, $channel);

// Check whether everything was ok
if($result->error == "OK")
	print "Thanks, your booking ID is " . $result->booking->booking_id;
else
	print "Sorry, there was a problem: " . $result->error;
Thanks, your booking ID is 123456

C# examples use the .Net Client Library

Overload list

XmlDocument CommitNewBooking (XmlDocument bookingData, int channelId)


Parameters

bookingData
XmlDocument containing the temporary booking ID to commit
channelId
The channel the temporary booking was made with

VB examples use the .Net Client Library

Overload list

XmlDocument CommitNewBooking (XmlDocument bookingData, Integer channelId)


Parameters

bookingData
XmlDocument containing the temporary booking ID to commit
channelId
The channel the temporary booking was made with

NodeJS examples use the NodeJS Wrapper


Example

// This example commits (converts from temporary) booking 1234 on Channel 3930
// It also suppresses any email that would usually send (suppress_email: 1)
// This suppression is common for tour operators who let a subsequent payment
// move the booking to "Confirmed", only sending an email at that point
TourCMS.commitBooking({
  channelId: 3930,
  booking: {
    booking_id: 1234,
    suppress_email: 1
  },
  callback: function(response) {
    console.log(response.error);
  }
});
OK

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

Try it

Enter your TourCMS API credentials below to call the Commit booking endpoint.

You will need the booking_id of a temporary booking, create one using Start New Booking.

Take care, submitting this form will modify live data!


            
            

Querystring parameters

There are no querystring parameters.

Post fields

Post fields
XML NodeNotes
booking

The root XML element

XML NodeNotes
booking_idThe temporary booking ID obtained via a call to the Start new booking API
suppress_emailOptional. Set to 1 to stop TourCMS sending a booking confirmation email, perhaps because you wish to send your own or are processing a payment (which might cause TourCMS to send a second email).
 
For use by Tour Operators only (not for use by Marketplace Partners.
agent_refOptional travel agent booking reference. Can also be supplied at Start new booking however perhaps you do not have your own reference at that point, so provide it here. See notes on Booking Start for usage information

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.
supplier_subsystem_error If the <error> is "SUPPLIER_SUBSYSTEM_ERROR", indicating an issue committing the booking in a supplier subsystem then TourCMS will provide more information on the error that was experienced.
supplier_subsystem_message If the <error> is "SUPPLIER_SUBSYSTEM_ERROR", indicating an issue committing the booking in a supplier subsystem and if the subsystem has provided a textual explanation it will be included here.
booking

If the temporary booking was converted to live there will be a booking node containing:

XML NodeNotes
booking_idID number for the new temporary booking
channel_idChannel ID
account_idAccount ID
statusStatus of the booking
 
0 - Quote
1 - Provisional
2 - Confirmed
status_textTextual representation of the booking status.
E.g. "Confirmed"
voucher_urlIf the account is using the standard voucher system, this link will point to the page showing the voucher.
 
When the URL is visited the voucher will only be displayed if the booking is Confirmed status, if it is Quotation or Provisional status an alternative message will be displayed.
barcode_dataBarcode value used on TourCMS standard vouchers if a supplier has not provided their own subsytem reference. Learn more about operator references, barcodes and vouchers in TourCMS
components

A component represents a line item in a booking (e.g. a tour or option). Components will be listed in the display order that is as the booking tokens / user interface.
 
Only very minimal component information is returned, intended to allow pulling of any subsystem references / tickets for use on barcodes and vouchers, if more detail is required call Show Booking.

XML NodeNotes
component

There will be a component node for each

XML NodeNotes
component_idInternal ID for the component
component_namee.g. the tour name
linked_component_idOptions are added to tours. If an option, this will be the ID of the tour component it is associated with
product_ide.g. tour_id if a tour
product_codee.g. the tour code if a tour
product_notee.g. pickup transfer zone (the note on a departure)
sale_quantityQuantity
date_ide.g departure id if a departure
date_codee.g. the departure code (if a departure)
start_dateYYYY-MM-DD format
end_dateYYYY-MM-DD format
start_timeHH:MM (24hr) (Tours only)
end_timeHH:MM (24hr) (Tours only)
operator_referenceThe reference for this booking/component in the operators subsystem (if applicable). Learn more about supplier references, barcodes and vouchers in TourCMS.
barcode_symbologyIf the operator has a specific requirement for voucher barcodes a symbology can be specified here. Currently supported values are QR_CODE and CODE_128. Where not provided QR_CODE is strongly preferred. Learn more about supplier references, barcodes and vouchers in TourCMS
tickets

If the supplier has provided individual ticket references for this component they will be listed here. Learn more about supplier references, barcodes and vouchers in TourCMS

XML NodeNotes
ticket

There will be an ticket node for each ticket, containing:

XML NodeNotes
valueThe ticket value/reference. Display this and place in any barcode (see "barcode_symbology").
labelAn optional label that can add extra information to the ticket details beyond the name of the tour, for example "Entry to museum".
urls

If the supplier has provided individual urls for this component they will be listed here. Learn more about supplier references, barcodes and vouchers in TourCMS

XML NodeNotes
url

There will be a url node for each urls, containing:

XML NodeNotes
typeCurrently the only supported type is "voucher", indicating the URL is a voucher to be presented to the customer for this booking component.
mime_typeThe mime-type for the document that will be served by the URL. Currently valid are "text/html" or "application/pdf".
linkThe link to present to the customer.
labelOptionally a label may be provided, which can be displayed alongside the voucher
rate_descriptionRate note (freetext) (e.g. Adult)
rate_breakdownFor tours....
e.g r1|a means rate 1 / adult
(s-senior, a-adult, y-youth, c-child, i-infant)
(r1 is the rate_id from show tour)

For hotels....
Seniors|Adults|Children|Infants

More information