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 > List Tours

List Tours

Notes

Often used when pulling tour data into an external database / system as it provides a basic list of the tours available to you in the API. You can then run Tour Show against each tour to get the full details.

Alternatively you are using the displaying a list of tours to a customer then the Tour Search endpoint is better.

Includes tours with no future bookable dates - indicated by "has_sale" being set to "0".

REST info

Endpoint/c/tours/list
/p/tours/list
FormatsXML
Example/c/tours/list.xml
VerbGET

Code samples

PHP examples use the PHP Client Library with SimpleXML

Description

object list_tours ( [ int $channel = 0 [, string $queryString = ""] ] ) 


Parameters

$channel
ID for a Channel (supplier) to list products from
queryString
Search query string, see possible values in the table below

Example

// Set the Channel ID
// For Suppliers this can be found in the API settings page
// For Partners this can be a specific Channel or 0 to list from all
$channel = 3;

// Query the TourCMS API
$result = $tourcms->list_tours($channel);

// Loop through each Tour and print out the Tour ID
foreach($result as $tour) {
	print $tour->tour_id.'
'; }
42
99
104

C# examples use the .Net Client Library

Overload list

XmlDocument ListTours ()
XmlDocument ListTours (int channelId)
XmlDocument ListTours (string queryString)
XmlDocument ListTours (string queryString, int channelId)


Parameters

queryString
Search query string, see possible values in the table below
channelId
Channel to list Tours from, 0/blank for all connected channels

Example

// Set the Channel ID
// For Operators this can be found in the API settings page
// For Agents this can be a specific Channel or 0 to list tours from all
int channelId = 0;

// Build Search querystring (see table below)
string queryString = "";

// Call the API
XmlDocument doc = myTourCMS.ListTours(queryString, channelId);

// Display Tour ID list
XmlNodeList tourList = doc.GetElementsByTagName("tour");
foreach (XmlNode tour in tourList)
{
	string tourId = tour.SelectSingleNode("tour_id").InnerText;
    Console.WriteLine(tourId);

}
42
99
104

VB examples use the .Net Client Library

Overload list

XmlDocument ListTours ()
XmlDocument ListTours (int channelId)
XmlDocument ListTours (string queryString)
XmlDocument ListTours (string queryString, int channelId)


Parameters

queryString
Search query string, see possible values in the table below
channelId
Channel to list Tours from, 0/blank for all connected channels

Example

' Set the Channel ID
' For Operators this can be found in the API settings page
' For Agents this can be a specific Channel or 0 to list tours from all
Dim channelId As Integer = 0

' Build Search querystring (see table below)
Dim queryString As String = ""

' Call the API
Dim doc As XmlDocument = myTourCMS.ListTours(queryString, channelId)

' Display Tour ID list
Dim tourList As XmlNodeList = doc.GetElementsByTagName("tour")
For Each tour As XmlNode in tourList

	Dim tourId As String = tour.SelectSingleNode("tour_id").InnerText
    Console.WriteLine(tourId)

Next
42
99
104

NodeJS examples use the NodeJS Wrapper


Example

//List all Tours on Channel 3930
TourCMS.listTours({
  channelId: 3930,
  callback: function(response) {
		response.tour.forEach(function(tour) {
			console.log(tour.tour_name_long);
		})
  }
});
Knoydart Peninsula Walking Adventure
Inner Hebrides Sailing & Walking Adventure

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

Implementing yourself? Check the REST info for this endpoint.

Try it

Enter your TourCMS API credentials below to call the List Tours endpoint.


            
            

Querystring parameters

Querystring parameters
XML NodeNotes
booking_styleSet to booking to only return Tours from Channels (Operators) that take confirmed online bookings (e.g. will ignore Tours from any Channels who take online "bookings" as an Enquiry or Quotation stage of the process)
qcEnable/disable "Quality control". Quality control can be switched on/off (default is off) within the Agent control panel and also overriden using this querystring parameter.
Note: This setting has no impact when a tour operator uses this API method on their own website.
 
Quality control explanation:
If you are a web affiliate sending traffic through to the suppliers website then turn qc=on to only return tours where TourCMS is confident web tracking of bookings is in place. If - rather than sending traffic to the suppliers website - you are using the API to input web bookings or enquiries then you don't need to worry about leakage via insufficient web tracking, hence can leave the quality control off. Also ensures tours meet certain image and description length criteria.

A Channel ID can also be passed in the request header, if using an API wrapper the Channel ID is passed as the first parameter

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
tour

There will be one tour node for each tour returned

Each tour node contains the following child nodes.

XML NodeNotes
channel_idChannel ID
account_idAccount ID
tour_idTour ID
delivery_formats

The format for the delivery option. Can be empty if no formats are included.

XML NodeNotes
delivery_format For each delivery format present on the response, a delivery_format node will be returned. Possible values are:

QR_CODE: You should generate the QR Code yourself on a ticket.

PDF_URL: Where you use the generated tickets as a PDF.

HTML: Vouchers are presented as html code.

CODE128: Vouchers are presented as a Code128 code.

delivery_methods

How the formats described in deliveryFormats will be delivered in the booking response. Can be empty if no methods are included.

XML NodeNotes
delivery_method For each delivery method present on the response, a delivery_method node will be returned. Possible values are:

TICKET: Individually per unit in the order (i.e. single ticket for each person)

TOUR: One ticket for each tour

BOOKING: One ticket for the whole booking.

redemption_method How the voucher can be redeemed. Possible values are:

MANIFEST: The guest name will be written down and they just need to show up.

DIGITAL: The tickets/voucher must be scanned but can be on mobile.

PRINT: The tickets/voucher must be printed and presented on arrival. Can be empty if no method is set.

distribution_identifierUnique tour identifier used to distribute tour
has_sale1 - Future product on sale
0 - No future product on sale
has_d1 - Has a tour departure loaded
0 - No tour departure loaded
has_f1 - Has a tour freesale loaded
0 - No tour freesale loaded
has_h1 - Has a hotel product type loaded
0 - No hotel product type loaded
descriptions_last_updatedWhen the tour text descriptions were last updated
tour_nameTour name
supplier_idIf a Tour Operator is using the API call directly then supplier_id will contain the internal reference number for the supplier. Not returned when a Marketplace Agent is using the API.
supplier_tour_codeIf a Tour Operator is using the API call directly then supplier_tour_code will contain the 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. Not returned when a Marketplace Agent is using the API.

More information