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

Contact Info

Palisis AG
Seestrasse 25
8702 Zollikon
support@palisis.com
+41 44 533 40 40

Follow Us

home > support > API > Marketplace API > Endpoints > API: update tour

Update Tour

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

To update images/documents see the Upload tour image/document, Delete tour image and Delete tour document endpoints.

REST info

Endpoint/c/tour/update
FormatsXML
ExampleURL: /c/tour/update.xml
 
POST data:
<?xml version="1.0"?>
<tour>
	<tour_id>12345</tour_id>
	<start_time_default>11:00</start_time_default>
	<end_time_default>15:00</end_time_default>
</tour>
VerbPOST

Code samples

PHP examples use the PHP Client Library with SimpleXML

Description

object update_tour ( SimpleXmlElement $update_data, int $channel )


Parameters

$update
SimpleXmlElement containing the tour data
$channel
ID number for the channel the tour belongs to

Example

// Define the channel ID this Tour belongs to
$channel = 3930;

// Start building the agent XML
$tour_data = new SimpleXMLElement('<tour />');

// Define the ID of the Tour we wish to update
$tour_data->addChild('tour_id', '1');

// Set new start time
$tour_data->addChild('start_time_default', '13:00');

// Set new end time
$tour_data->addChild('end_time_default', '16:00');

// Call TourCMS API, updating the Tour URL
$result = $tourcms->update_tour($update_data, $channel);

print $result->error;
OK

C# examples use the .Net Client Library

The most common field to update is the "Product page URL", so a simplified wrapper call has been included in the client library and can be used with: XmlDocument UpdateTourUrl (int tourId, int channelId, string tourUrl)

Overload list

XmlDocument UpdateTour(XmlDocument tourData, int channelId)


Parameters

tourData
XmlElement containing the tour data to be updated
channelId
ID number for the channel the tour belongs to

Example


// ID for the Tour we want to update
int tourId = 1;

// ID for the channel the Tour belongs to
int channelId = 3930;

// Build XML Document to hold the new Url
XmlDocument tourData = new XmlDocument();

// Create the XML Declaration, append it to XML document
XmlDeclaration dec = tourData.CreateXmlDeclaration("1.0", null, null);
tourData.AppendChild(dec);

// Create the root element, append it to the XML document
XmlElement root = tourData.CreateElement("tour");
tourData.AppendChild(root);

// Set the Tour ID so TourCMS knows which Tour/Hotel to update
XmlElement tourIdXml = tourData.CreateElement("tour_id");
tourIdXml.InnerText = tourId.ToString();
root.AppendChild(tourIdXml);

// Set the new start date
XmlElement tourStartDatelXml = tourData.CreateElement("start_time_default");
tourStartDatelXml.InnerText = '13:00';
root.AppendChild(tourStartDateXml);

// Set the new end date
XmlElement tourEndDatelXml = tourData.CreateElement("end_time_default");
tourEndDatelXml.InnerText = '16:00';
root.AppendChild(tourEndDateXml);

// Call the API
XmlDocument doc = myTourCMS.UpdateTour(tourData, channelId);

// Get the response status, will be "OK" if TourCMS updated the Tour
string status = doc.SelectSingleNode("//error").InnerText;
Console.WriteLine(status);
OK

VB examples use the .Net Client Library

Overload list

XmlDocument UpdateTour(XmlDocument tourData, Integer channelId)


Parameters

tourData
XmlElement containing the tour data to be updated
channelId
ID number for the channel the tour belongs to

Example


' ID for the channel the Tour belongs to
Dim channelId As Integer = 3930

' The new Tour data to be updated
Dim tourData As XDocument = 
	<tour>
		<tour_id>1</tour_id>
		<start_time_default>11:00</start_time_default>
		<end_time_default>15:00</end_time_default>
	</tour>


' Call the API
Dim doc As XmlDocument = myTourCMS.UpdateTour(tourData, channelId)

' Get the response status, will be "OK" if TourCMS updated the Tour
Dim status As String = doc.SelectSingleNode("//error").InnerText
Console.WriteLine(status)
OK

NodeJS examples use the NodeJS Wrapper


Example

// Change the URL for Tour 1
TourCMS.updateTour({
tour: {
  tourId: 1,
  tour_url: '/tours/example_tour_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 Update Tour endpoint.

Take care, submitting this form will modify live data!


            
            

Post fields

Post fields
NodeNotes
data

The data root node

NodeNotes
parameters

An optional parameters node, used to provide extra configuration.

NodeNotes
copy_to_other_channels_same_language Some of the fields provided to update tour such as descriptive text are channel specific and so will be stored against the Channel being used to call the API. Setting this parameter to 1 will update those fields in any other channels with the same language, e.g. if the channel updated is Spanish, the descriptions on all Spanish channels will be updated too.
tour

The tour

NodeNotes
tour_id The ID of the tour to update Required
tour_name Tour name - Short (Max. 50 characters)
tour_name_long Tour name - Long (Max. 100 characters)
live_status The status for the tour (must be 1/public to be available in the API and to all distributors):
0 - Private, only bookable by staff (Default)
1 - Public, also bookable via hosted TourCMS booking engine
distribute Whether the tour should be distributed via the API & TourCMS Marketplace. Must be 1/distributed to be available in the API and to all distributors:
0 - Not distributed (Default)
1 - Distributed (please note live_status must also be 1
requires_subsystem_tickets Whether the tour should only be bookable by Distributors capable of displaying subsystem barcodes / tickets on either their voucher, or using the standard TourCMS hosted voucher. Barcodes / ticket refer:
0 - Can be sold by distributors regardless of whether they display subsystem barcodes or not
1 - Only distributors that display subsystem barcodes can book this tour
leadin_price_type Whether TourCMS should auto calculate a lead in ("from") price for the tour, or use a fixed one.
auto - TourCMS should auto calculate a lead in ("from") price (Default)
manual - TourCMS should display a lead in ("from") price entered manually
leadin_price_sale int/float for a value (in account base currency) to use as a basis for any channels selling base on loaded sale prices (i.e. not cost plus markup).
 
Only stored if leadin_price_type is "manual"
leadin_price_cost int/float for a value (in tour cost currency) to use as a basis for any channels selling base on loaded cost prices (i.e. not those based on sale price).
 
Only stored if leadin_price_type is "manual"
cost_currency The currency for any costs loaded on this tour. 3 digit ISO 4217, e.g. "EUR", "USD". Must be a currency TourCMS supports. Defaults to account currency if not provided.
times_or_codes Whether individual departures will have their own times or not.
 
c - Codes. Each departure will not have it's own time, times may instead be configured at the tour level (see start_time_default and end_time_default) or not at all.
t - Times. Each departure will have a start and end time provided, i.e. start and end times vary (Default)
start_time_defaultDefault Start time for the Tour.
 
Must be either "NOTSET" (Default) for tours with no time / when start time varies
- OR -
24 hour time value in tour local time (e.g. "09:00").
end_time_defaultDefault End time for the Tour/Hotel.
 
Possible values as per start_time_default above.
time_type Purely for display purposes currently, indicates to end users whether the times loaded are tour start and end times, opening hours or entry times with flexible ends.

strict - Tour start and end times (Default)
opening_hours - Opening Hours
strict_start - Entry time with flexible duration
start_timezone Timezone for start time, otherwise start time assumed to be “local time”. E.g. Europe/London
end_timezone Timezone for end time, otherwise end time assumed to be “local time”.
E.g. Europe/London
quantity_ruleWhether the prices loaded in the system should be multiplied by the quantity booked.
 
For example 2 adults booking a tour with a price of $99 might come to $198 if the quantity_rule is "q" or $99 if the quantity_rule is "1".
 
1 - price x 1 (for group pricing)
q - price x quantity (per person pricing)
volume_pricingWhether the prices loaded in the system vary based on the quantity of tickets booked.
 
0 = Per ticket price does not vary based on quantity
1 = Per ticket price does vary based on quantity.
tour_codeTour code. Can be customer facing, e.g. in hosted booking engine.
supplier_tour_codeThe supplier set tour code. This field is ideal if you are syncronising TourCMS with an external reservation system as this could be the external reservation system tour ID.
from_price_unitLead in price unit

0 - per person (default)
1 - per couple
2 - per vehicle
3 - per room

This field is for display purposes only e.g. to show, next to a lead in price, what the price relates to
priorityHIGH, MEDIUM (Default), LOW - Commercial priority
display_pointsUsed for ordering products in some instances, lowest first. Integer, 1 (Default) to 100.
geocode_start_point

Information about the starting point of the tour

XML NodeNotes
geocodelat,lng geocode point
labelText label for the point (e.g. a place or building name)
google_place_idA Google Place ID
google_place_nameThe name associated with the Google Place ID
google_place_addressThe address associated with the Google Place ID
search_termThe search term used to retrive the Google Place ID from Google. Useful in case the Place ID needs to be refreshed in future.
loc_relationHow the geo point relates to the tour.
 
0 = No Admission
1 = Admission Granted
2 = Supplementary Add-on
geocode_end_point

Information about the ending point of the tour

XML NodeNotes
geocodelat,lng geocode point
labelText label for the point (e.g. a place or building name)
google_place_idA Google Place ID
google_place_nameThe name associated with the Google Place ID
google_place_addressThe address associated with the Google Place ID
search_termThe search term used to retrive the Google Place ID from Google. Useful in case the Place ID needs to be refreshed in future.
loc_relationHow the geo point relates to the tour.
 
0 = No Admission
1 = Admission Granted
2 = Supplementary Add-on
geocode_midpoints

Optionally set some midpoint that the tour visits between the start and end points. Could be showing a tour route map, or in the case of hop on / hop off tours it show bus stops.

XML NodeNotes
midpoint

There should be a midpoint node for each midpoint (tour route map, hop on / hop off point etc) on this Tour

XML NodeNotes
geocodelat,lng geocode point
labelText label for the point (e.g. a place or building name)
google_place_idA Google Place ID
google_place_nameThe name associated with the Google Place ID
google_place_addressThe address associated with the Google Place ID
search_termThe search term used to retrive the Google Place ID from Google. Useful in case the Place ID needs to be refreshed in future.
loc_relationHow the geo point relates to the tour.
 
0 = No Admission
1 = Admission Granted
2 = Supplementary Add-on
can_start_end_here Where the customer can start/end the Tour/Itinerary at this point.
 
0 = No (could just be a tour map calling point)
1 = Yes (could be a hop on / hop off bus stop)
pickup_on_request 1 - Customer can provide a freetext pickup point
0 - Customer cannot provide a freetext pickup point
 
Regardless of the setting here, there may be a predefined list of available pickup points in the pickup_points node.
grade 1 - All ages / Not applicable (Default)
2 - Moderate
3 - Fit
4 - Challenging
5 - Extreme
accomrating 1 - No accommodation / Not applicable
2 - Luxury
3 - Moderate
4 - Comfortable
5 - Basic
6 - Various levels
product_type 1 - Accommodation (hotel/campsite/villa/ski chalet/lodge)
2 - Transport/Transfer
3 - Tour/cruise including overnight stay
4 - Day tour/trip/activity/attraction (No overnight stay)
5 - Tailor made
6 - Event
7 - Training/education
8 - Other
9 - Restaurant / Meal alternative

In the case of "2" (Transport/Transfer) there can be an attribute on the XML element indicating the direction of travel.
 
0 - Other / not set
1 - Airport to City
2 - City to Airport
3 - Two way return
 
E.g. for a return transfer <product_type direction="3">2<product_type>

Also an airport code may be provided
E.g. for London Gatwick <product_type direction="3" airport_code="LGW">2<product_type>
tourleader_type 1 - Tour guide / driver
2 - Independent / self drive
3 - Not applicable (e.g. accommodation / event)
tour_tags

Additional semi-structured information regarding the tour.

NodeNotes
tag

Add a tag node for each tour tag category you wish to store:

NodeNotes
token The token identifier for tag checklist item.
 
The list may be reduced/extended in future however the current list is:
 
adults-only
animals
audio-guide
beaches
bike-tours
boat-tours
city-cards
classes
day-trips
family-friendly
fast-track
food
history
hop-on-hop-off
literature
live-music
museums
nightlife
outdoors
private-tours
romantic
small-group-tours
sports
suitable-for-solo
suitable-for-couples
suitable-for-children
suitable-for-groups
suitable-for-students
suitable-for-business
suitable-for-wheelchairs
theme-park
walking-tours
value 1 / 0 (Default)
health_and_safety

Information regarding enhanced cleaning / health & safety provisions.

NodeNotes
item

Add an item node for each health and safety checklist item containing:

NodeNotes
name The identifier for health and safety checklist item.
 
The list may be reduced/extended in future however the current list is:
 
face_masks_requied_for_travelers
face_masks_requied_for_guides
face_masks_provided_for_travelers
hand_sanitizer_available
social_distancing_enforced
regularly_sanitized
equipment_sanitized
transportation_vehicles_sanitized
guides_required_to_wash_hands
temperature_checks_for_staff
temperature_checks_for_travelers
contactless_payments_for_extras
value NOTSET (Default) / YES / NO
languages_spokenLanguages spoken on the tour. Comma separated list. E.g. "en,pt" for English & Portuguese.
 
Valid languages are: ca, da, de, el, en, en-au, en-us, es, fi, fr, hr, is, it, jp, ko, nl, no, pt, ro, ru, sl, sv, tr, zh
locationPrimary location - Perhaps a city name, national park name or region. 50 chars.
summarySummary - Includes primary activity if not clear from tour name. 650 chars
countryCountries the tour takes place - 2 digit ISO code format. NB: Currently limited to a single country (although more can be entered via the UI)
duration_descText description for duration (e.g. 1 week)
 
Free text field edited by tour operator staff users. Human readable but not necessarily consistent across accounts. 150 chars.
availableText description for when available (e.g. March to September). 150 Chars
shortdescShort description (NO HTML). 650 Chars.
longdescLong description. Some HTML allowed. 10,000 Chars.
itineraryItinerary. Some HTML allowed.
expRather than facts, this description should focus on the experience e.g. a wonderful hill walk with great vistas. Some HTML allowed. 650 Chars.
pickHotel pickup instructions. Some HTML allowed. 10,200 Chars.
redeemVoucher redemption instructions. Some HTML allowed. 2,200 Chars.
incWhat's included. Some HTML allowed. 2,200 Chars.
exWhat's not included. Some HTML allowed. 2,200 Chars.
essentialEssential information - What to bring, accommodation details, single supplements, solo travellers. Some HTML allowed. 2,200 Chars.
extrasExtras / upgrades. Some HTML allowed.
restRestrictions - e.g. Pets, minimum age / children permitted, whether requires a preexisting skill etc. Some HTML allowed. 10,200 Chars.
tour_url Required for distribution.
URL for the tour detail page. This must return a 200 status page. Either an absolute or relative URL can be provided.
videos

A videos node can optionally be provided containing a video node for a video to be associated with a tour.

NodeNotes
video

XML NodeNotes
video_url URL for either a YouTube or Vimeo video
min_departure_sizeThe minimum (num people/quantity) required per departure on this tour. A number below which a tour may not be feasible / viable to operate.
 
Uncommonly used but can be configured to alert staff of departures below a certain number, or restrict last minute bookings to be at least this big. Default is 1.
max_departure_sizeThe maximum (num people/quantity) allowed per departure on this tour. i.e. the number of spaces on a departure will generally be this values minus the number of passengers already booked
min_booking_sizeThe minimum (num people/quantity) required per booking this tour.
 
Individual dates may have a higher minimum booking size, for example last minute dates may require a certain minimum for the tour to depart. 1-250. Default 1.
max_booking_sizeThe maximum (num people/quantity) allowed per booking on this tour.
 
Individual dates may have a lower maximum booking size, for example if there are only a few spaces remaining. The spaces remaining on a certain date are returned in the dates and deals API. 1-250. Default 10.
tour_permit_child_onlyWhether child only bookings should be allowed
 
0 - Don't allow Child only bookings
1 - Allow Child only bookings (Default)
min_notice_typeCombined with min_notice controls how close to departure TourCMS should stop bookings. i.e. Cutoff
 
hour - min_notice will be a number of hours before departure
days - min_notice will be a number of days before departure
dayb - min_notice will be a time the day before
samd - min_notice will be a time the same day of departure, often used when times are opening hours and bookings can come in through the day
min_noticeCombined with min_notice controls how close to departure TourCMS should stop bookings. If min_notice is "hours" or "days" this should be an integer value, if "dayb" or "samd" should be either a 24 hour time e.g. "09:00" or "NOTSET".
new_booking

Information to help those building their own booking engine using the API. :

NodeNotes
people_selection

Information on the various rates (pricing tiers) offered, including min/max numbers of people

NodeNotes
rate

There should be a rate node for each individual pricing tier offered on this Tour containing:

NodeNotes
rate_id Identifier for the rate. r1 to r10.
label_1 Main customer facing descriptor for this rate, e.g. "Adults".
 
May be blank in which case display text such as "Number of people"
label_2 Secondary customer facing descriptor for this rate, e.g. "(16plus)"
agecat Age category (s-senior, a-adult, y-youth, c-child, i-infant). Please note rate 1 is always assumed to be "a" adult/all.
agerange_min The youngest someone can be to book this rate. (Integer, whole years)
agerange_max The oldest someone can be to book this rate (Integer, whole years)
rate_code Additional field for cross sytem mapping. E.g. perhaps the ID for this rate in a supplier subsystem.
validity

How long the item is valid for from first use / start date. E.g. 24 hour hop on hop off, 7 day attraction ticket. Please note TourCMS itself does not currently place any restrictions on use, these are currently for display purposes only.

XML Node Notes
validity_type For display purposes only. The unit for the validity_value, e.g. “days” for “7 days”, “hours” for “24 hours”.
validity_value Value for validity_type, e.g. “7” for 7 days, “24” for 24 hours.
custom_fields

If any custom fields are configured then a custom_fields node will be returned containing the following:

XML NodeNotes
field

There will be a field node for each custom field, containing:

XML NodeNotes
nameCustom field name
valueValue for the custom field

HTML Use

For fields indicating support for "Some HTML" the following tags can be used: <strong> <em> <ul> <li>. Any other HTML will be stripped

Response fields

Response fields
XML NodeNotes
request Confirmation of the request that you sent
error Any error message returned, if there is no error and the tour has been deleted error will just contain the text OK
error_list

If error is NOTOK there may be additional detail in the error list below:

XML NodeNotes
error

One error node per tour validation error returned:

XML NodeNotes
field The provided XML node which failed
message A natural language description of the problem with the field
tour

If a tour was updated, the following details will be returned:

XML NodeNotes
channel_id The primary channel used to update the tour
account_id The ID for the account the tour has been updated in
tour_id The ID for the tour updated

More information