home > support > API > Marketplace API > API: supplier information
View information on an internal (to a an operator account) supplier record.
For use by Tour Operators only (not for use by Marketplace Partners). Marketplace partners retrieving information on the Channels (operators) they are connected with via the Marketplace see Show Channel.
Endpoint | /c/supplier/show |
Formats | XML |
Example | /c/supplier/show.xml?supplier_id=12345 |
Verb | GET |
PHP examples use the PHP Client Library with SimpleXML
object show_supplier ( int $supplier, int $channel )
// ID for the supplier
$supplier = 12345;
// Set your channel ID
$channel = 3;
// Query the TourCMS API
$result = $tourcms->show_supplier($supplier, $channel);
// Get the supplier node
$supplier = $result->supplier;
// Print out the supplier name and code
print $supplier->name . " - " . $supplier->code;
Marriott Hotels - MARRIOTT
C# examples use the .Net Client Library
XmlDocument ShowSupplier (int supplierId, int channelId)
// ID for the supplier
int supplierId = 12345;
// Set your channel ID
int channelId = 3;
// Call the TourCMS API
XmlDocument doc = myTourCMS.ShowSupplier(supplierId, channelId);
// Check the status of the response
string status = doc.SelectSingleNode("//error").InnerText;
// If the status is "OK" TourCMS will have returned our Supplier
if ( status == "OK" )
{
// Success! Print out the supplier name and code
string supN = doc.SelectSingleNode("//supplier/name").InnerText;
string supC = doc.SelectSingleNode("//supplier/code").InnerText;
Console.WriteLine(supN + " - " + supC);
} else {
// Failure! Print out the error text to debug
Console.WriteLine("Error: " + status);
}
Marriott Hotels - MARRIOTT
VB examples use the .Net Client Library
XmlDocument ShowSupplier (Integer supplierId, Integer channelId)
' ID for the supplier
Dim supplierId As Integer = 12345
' Set your channel ID
Dim channelId As Integer = 3
' Call the TourCMS API
Dim doc As XmlDocument = myTourCMS.ShowSupplier(supplierId, channelId)
' Check the status of the response
Dim status As String = doc.SelectSingleNode("//error").InnerText
' If the status is "OK" TourCMS will have returned our Supplier
If status = "OK" Then
' Success! Print out the supplier name and code
Dim supN As String = doc.SelectSingleNode("//supplier/name").InnerText
Dim supC As String= doc.SelectSingleNode("//supplier/code").InnerText
Console.WriteLine(supN & " - " & supC)
Else
' Failure! Print out the error text to debug
Console.WriteLine("Error: " & status)
End If
Marriott Hotels - MARRIOTT
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 Supplier endpoint.
XML Node | Notes |
---|---|
supplier_id | Internal ID number for a supplier (perhaps retrieved from a booking record) |
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 | supplier |
The channel node contains the following child nodes.
|