home > support > API > Marketplace API > API: supplier information
Show Supplier
| Purpose | View information on an internal supplier record |
| Notes | For use by Tour Operators only (not for use by Marketplace Partners). Marketplace partners retrieving information on the Channels (suppliers) they are connected with via the Marketplace see Show Channel. |
| REST info |
Call | /c/supplier/show |
| Formats | XML |
| Example | /c/supplier/show.xml?supplier_id=12345 |
| Verb | GET |
| Code |
PHP examples use the PHP Client Library with SimpleXML
Description
object show_supplier ( int $supplier, int $channel )
Parameters
$supplier
ID for the supplier we want to view
$channel
Our channel ID
Example
// ID for the supplier
$supplier = 12345;
// Set your channel ID
int channelId = 3;
// Query the TourCMS API
$result = $tourcms->show_supplier($supplier);
// 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
Overload list
XmlDocument ShowSupplier (int supplierId, int channelId)
Parameters
supplierId
Internal TourCMS supplier ID
channelId
ID for the channel that the supplier belongs to
Example
// 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
Overload list
XmlDocument ShowSupplier (Integer supplierId, Integer channelId)
Parameters
supplierId
Internal TourCMS supplier ID
channelId
ID for the channel that the supplier belongs to
Example
' 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
|
Querystring parameters
Querystring parameters
| XML Node | Notes |
| supplier_id |
Internal ID number for a supplier (perhaps retrieved from a booking record) |
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 |
supplier |
The channel node contains the following child nodes.
| XML Node | Notes |
| supplier_id | Supplier ID |
| channel_id | Channel ID |
| account_id | Account ID |
| name | Display name for the suplier |
| code | Code for the supplier |
| home_url | Website homepage url |
| logo_url | Logo image url |
| contact_name | Name of the contact (person) at the supplier |
| email_bookings | Email address for sending booking information |
| email_accounts | Email address for accounts |
| address | Postal address (multiline) |
| short_desc | Short description |
| long_desc | Long description |
| why_desc | Why us? |
| bonding_desc | Bonding / financial protection |
| certification | e.g. for activity companies could be industry association memberships |
| cancel_policy | Cancellation policy |
| terms_and_conditions | Terms and conditions for booking |
|
More information