home > support > API > Marketplace API > API: tours list
List Tours
| Purpose | List 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. |
| Notes | N/A |
| REST info |
| Call | /c/tours/list /p/tours/list |
| Formats | XML |
| Example | /c/tours/list.xml |
| Verb | GET |
|
| 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 Node | Notes |
| 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 Node | Notes |
| channel_id | Channel ID |
| account_id | Account ID |
| tour_id | Tour/Hotel ID |
| has_sale | 1 - Future product on sale 0 - No future product on sale |
| has_d | 1 - Has a tour departure loaded 0 - No tour departure loaded |
| has_f | 1 - Has a tour freesale loaded 0 - No tour freesale loaded |
| has_h | 1 - Has a hotel product type loaded 0 - No hotel product type loaded | | descriptions_last_updated | When the tour/hotel text descriptions were last updated |
| tour_name | Tour/hotel name |
| supplier_id | If 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