home > support > API > Marketplace API > API: tours list

List Tours

PurposeList of tours. Most useful if you are taking all API data into a local database and you want to quickly find out which tours you are connected to. This call will give you a good list of tours to then run Tour Show against.
 
If you are using the API for live search, or if you want to display a detailed list of Tours on a web page use the Tour Search call.
NotesN/A
REST info
Call/c/tours/list
/p/tours/list
FormatsXML
Example/c/tours/list.xml
VerbGET
PHP info

PHP examples use the PHP Client Library with SimpleXML

Description

object list_tours ( [ int $channel = 0 ] ) 

Parameters

$channel
	ID for a Channel (supplier) to list products from

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

Querystring parameters

N/A

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/Hotel ID
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/hotel text descriptions were last updated
tour_nameTour/hotel name
supplier_idIf a Tour Operator is using the API call directly then supplier_id will contain the internal reference number for the supplier on the main Tour/Hotel on the booking. Not returned when a Marketplace Partner is using the API.

Sample XML Response

None here currently

More information

© 2003-2012 Travel UCD Limited. All rights reserved. TourCMS® is a registered trademark of Travel UCD Limited, United Kingdom. View Privacy policy.

Free 1 hour webinar - An introduction to TourCMS, 31st May @ 3pm GMT / 4pm BST (UK). Check in your timezone and register »