home > support > API > Marketplace API > Show Channel
Return channel information. Think of this as company/brand information for a tour operator.
Most TourCMS accounts will only have one channel however it is possible for TourCMS accounts to follow a multi-channel strategy.
The data fields with _private in are not for public display. They are provided to make it easy for you to create a management system to review multiple channels.
Endpoint | /c/channel/show |
Formats | XML |
Example | /c/channel/show.xml |
Verb | GET |
PHP examples use the PHP Client Library with SimpleXML
object show_channel ( int $channel )
// ID for the channel (supplier) we want the details for
$channel = 6;
// Query the TourCMS API
$result = $tourcms->show_channel($channel);
// Get the channel node
$channel = $result->channel;
// Display a link to the channel website
echo '<a href="'.$channel->home_url.'">'.$channel->channel_name.' website</a>';
<a href="http://www.example.com">Example Tours website</a>
C# examples use the .Net Client Library
XmlDocument ShowChannel (int ChannelId)
// ID for the channel (supplier) we want the details for
int channelId = 3;
// Query the TourCMS API
XmlDocument doc = myTourCMS.ShowChannel(channelId);
// Display the Channel name and web address
String chanName = doc.SelectSingleNode("//channel/channel_name");
String chanWeb = doc.SelectSingleNode("//channel/home_url");
Console.WriteLine(chanName + " website - " + chanWeb);
Example Tours website - http://www.example.com
VB examples use the .Net Client Library
XmlDocument ShowChannel (int ChannelId)
' ID for the channel (supplier) we want the details for
Dim channelId As Integer = 6
' Query the TourCMS API
Dim doc As XmlDocument = myTourCMS.ShowChannel(channelId)
' Display the Channel name and web address
Dim chanName As String = doc.SelectSingleNode("//channel/channel_name")
Dim chanWeb As String = doc.SelectSingleNode("//channel/home_url")
Console.WriteLine(chanName & " website - " & chanWeb)
Example Tours website - http://www.example.com
NodeJS examples use the NodeJS Wrapper
TourCMS.showChannel({
channelId: 3930,
callback: function(response) {
var ch = response.channel;
console.log(ch.channel_name + " website - " + ch.home_url);
}
})
Example Tours website - http://www.example.com
Looking for sample code in a different language? TourCMS and community provided API libraries
Implementing yourself? Check the REST info for this endpoint.
Enter your TourCMS API credentials below to call the Show Channel endpoint.
There are no querystring parameters supported by this method.
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 |
The channel node contains the following child nodes.
|
||||||||||||||||
If API called by a Marketplace Agent | |||||||||||||||||||
agent_specific_fields |
If any agent specific fields are configured:
|
||||||||||||||||||
If API called by Tour Operator (not Marketplace Agent) | |||||||||||||||||||
google_analytics_id | Google Analytics ID |