home > support > API > Marketplace API > API: channels list

List Channels

PurposeList 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
Notesn/a
REST info Call/p/channels/list
FormatsXML
Example/p/channels/list.xml
VerbGET
Code

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

Querystring parameters

There are no querystring parameters supported by this method.

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
channel

There will be one channel node for channel returned

Each channel node contains the following child nodes.

XML NodeNotes
channel_idChannel ID
account_idAccount ID
channel_nameChannel name
logo_urlChannel logo URL
home_urlURL website homepage
home_url_trackedURL website homepage (with agent tracking)
langLanguage
short_descShort description
long_descLong description

Sample XML response

/p/channels/list.xml

More information

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