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

Contact Info

Palisis AG
Florastrasse 18A
8610 Uster
+41 44 533 40 40

Follow Us

home > support > API > Marketplace API > managing dates & prices externally > create new departure

Create new departure

Create a new departure on a Tour

Part of a series of API calls intended largely for managing dates and prices outside of TourCMS


For Tour Operator usage only (not accessible by Marketplace Agents)

REST info

POST data:
<?xml version="1.0"?>

Code samples

PHP examples use the PHP Client Library with SimpleXML


object create_departure ( SimpleXmlElement $departure_data , int $channel )


SimpleXmlElement containing the raw departure information
The Channel that the tour belongs to


// Set our Channel ID
$channel = 3930;

// Start building the departure XML
$departure = new SimpleXMLElement('<departure />');

// Set the Tour this departure should be added to
$departure->addChild('tour_id', 1);

// Set the start and end date
$departure->addChild('start_date', '2012-11-22');
$departure->addChild('end_date', '2012-11-22');

// Set the code, in this example using the standard TourCMS time format
$departure->addChild('code', '13:00-16:00');

// Append a container for the components to be booked
// Rates for a Tour can be found via the "Show Tour" API method
$rates = $departure->addChild('rates');

// Here we'll just use one rate as an example
$rate = $departure->addChild('rate');

// Use the correct Rate ID
$rate->addChild('rate_id', 'r1');

// Set the customer price
// The currency for this will be the account base currency
$rate->addChild('customer_price', '100');

// Set the cost price
// The currency for this will be the cost currency configured on the Tour
$rate->addChild('supplier_cost', '90');

// Query the TourCMS API, creating the departure
$result = $tourcms->create_departure($departure , $channel);

if($result->error == "OK") {
	print "Departure created, the ID is: ";
	print $result->tour->departure_id;
} else {
	print $result->error;
Departure created, the ID is: 12345

C# examples use the .Net Client Library


string createdeparture = @"<departure>
XmlDocument xdoc = new XmlDocument();
XmlDocument response = myTourCMS.CreateDeparture(xdoc, 3930);


<?xml version="1.0" encoding="utf-8"?>
  <request>POST /c/tour/datesprices/dep/manage/new.xml</request>

VB examples use the .Net Client Library

Coming soon

Querystring parameters

There are no querystring parameters.

Post fields

The following fields can be posted as XML when calling this API method.

At a bare minimum the tour_id, start_date and end_date must be provided.

Post fields
XML NodeNotes

A departure containing:

XML NodeNotes
tour_idThe Tour that the departure should be added to.
codeDeparture code. May be in format 09:00-17:00 for day tours with specific time. To automatically have start_time and end_time populated populated the tour will need to have the Multiple start & end times option selected in the Times & Cutoffs tab of Tour CMS otherwise it will appear as text.
start_dateStart date (YYYY-MM-DD)
end_dateEnd date (YYYY-MM-DD)
noteNote for the departure (free text)
supplier_noteSupplier note (can be used for holding date specific IDs from 3rd party reservation systems)

If you would like to specify which guide languages are available, list them here, one language node per language

XML NodeNotes
language Tour guide language, 2 digit, e.g. "fr".
manually_closedSet to 1 to manually close the departure, 0 (or leave) to not
spaces_blockedNumber of spaces to block off sale (e.g. spaces that can't be booked)
fixed_sale_priceFor accounts with “Fixed sale price” functionality enabled, set whether this particular departure should be flagged as having a fixed sale price (overriding cost+ margin logic).
1 = fixed sale price, 0 = regular price (default is 0)

To provide a discounted price for the first rate add a special offer node containing:

XML NodeNotes
offer_priceThe price for the offer. The currency should be in the base currency for the account.
offer_noteNote for the offer (free text)

A rates node containing:

XML NodeNotes

A rate node for each rate including:

XML NodeNotes
rate_idThe identifier for the rate. A list of Rate IDs for a particular Tour can be found via the Tour Show method
customer_priceThe customer price for the rate. In the base currency for the account
supplier_costThe supplier cost for the rate. In the cost currency set on the Tour.

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.

A tour node containing the following:

XML NodeNotes
account_idAccount ID
channel_idChannel ID
tour_idTour ID
departure_idID number for the newly created departure

More information