Used by 400 Specialist Tour & Activity Operators worldwide
home > support > API > Marketplace API > List channels
List Channels
List of connected channels. Probably useful if you are taking all API data into a local database and you want to quickly find out which channels you are connected to. This call will give you a good list of channels to then run /c/channel/show against
You can also use this as a very basic list of suppliers featured on a multi-supplier website
REST info
Endpoint | /p/channels/list |
Formats | XML |
Example | /p/channels/list.xml |
Verb | GET |
Code samples
PHP examples use the PHP Client Library with SimpleXML
Description
object list_channels ()
Parameters
n/a
Example
// Query the TourCMS API
$result = $tourcms->list_channels();
// Loop through each channel
foreach($result as $channel) {
// Print out the channel name
print $channel->channel_name.'<br />';
}
Example Tours
Operator two
Another operator name
C# examples use the .Net Client Library
Overload list
XmlDocument ListChannels ()
Parameters
n/a
Example
// Query the TourCMS API
XmlDocument doc = myTourCMS.ListChannels();
// Display Channel list
XmlNodeList chanList = doc.GetElementsByTagName("channel");
foreach (XmlNode channel in chanList)
{
string chanName = channel.SelectSingleNode("channel_name").InnerText;
Console.WriteLine(chanName);
}
Example Tours
Operator two
Another operator name
VB examples use the .Net Client Library
Overload list
XmlDocument ListChannels ()
Parameters
n/a
Example
' Query the TourCMS API
Dim doc As XmlDocument = myTourCMS.ListChannels()
' Display Channel list
Dim chanList As XmlNodeList = doc.GetElementsByTagName("channel")
For Each channel As XmlNode In chanList
{
Dim chanName As String = channel.SelectSingleNode("channel_name").InnerText
Console.WriteLine(channelName);
}
Example Tours
Operator two
Another operator name
NodeJS examples use the NodeJS Wrapper
Example
TourCMS.listChannels({
callback: function(response) {
console.log(response);
}
})
Example Tours
Operator two
Another operator name
Looking for sample code in a different language? TourCMS and community provided API libraries
Querystring parameters
There are no querystring parameters supported by this method.
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 | ||||||||||||||||||||||||||||||||||||||||||
channel |
There will be one channel node for channel returned Each channel node contains the following child nodes.
|
Sample XML response
/p/channels/list.xml