home > support > API > Marketplace API > show enquiry
Enquiry Show
| Purpose | Show the details of a specific enquiry. |
| Notes | Marketplace partners can search for enquiries they have generated from any channel that have granted them permission level 2 or above when connecting, Enquiries will not be listed from Channels who have only granted level 1 permission. You can check permissions on your channels via the Your connections section of your control panel or by calling the Show Channel API call. |
| REST info |
Call | /c/enquiry/show |
| Formats | XML |
| Example | /c/enquiry/show.xml?enquiry_id=12345 |
| Verb | GET |
| Code |
PHP examples use the PHP Client Library with SimpleXML
Description
object show_enquiry ( int $enquiry, int $channel )
Parameters
$enquiry
ID number for the enquiry
$channel
ID number for the channel the enquiry is lodged with
Example
// Set the channel ID
// For tour operators this can be found in their API settings page
// For Marketplace Partners set this to the channel the Enquiry is in
$channel = 3;
// Set the enquiry ID
$enquiry = 12345
// Query the TourCMS API
$result = $tourcms->search_enquiries($enquiry, $channel);
// Print out some details regarding the enquiry
$enquiry = $result->enquiry;
print $enquiry->enquiry_id." - ".$enquiry->status_text;
12345 - Triage
C# examples use the .Net Client Library
Overload list
XmlDocument ShowEnquiry (int enquiryId, int channelId)
Parameters
enquiryId
Internal TourCMS enquiry ID (perhaps via Search Enquiries)
channelId
ID for the channel that the enquiry belongs to
Example
// ID for the enquiry
int enquiryId = 12345;
// ID for the channel (supplier) the enquiry belongs to
int channelId = 3;
// Call the TourCMS API
XmlDocument doc = myTourCMS.ShowEnquiry(enquiryId, channelId);
// Check the status of the response
string status = doc.SelectSingleNode("//error").InnerText;
// If the status is "OK" TourCMS will have returned our Enquiry
if ( status == "OK" )
{
// Success! Print out the ID and Status Text
string sText = doc.SelectSingleNode("//enquiry/status_text").InnerText;
Console.WriteLine(enquiryId + " - " + sText);
} else {
// Failure! Print out the error text to debug
Console.WriteLine("Error: " + status);
}
12345 - Triage
VB examples use the .Net Client Library
Overload list
XmlDocument ShowEnquiry (Integer enquiryId, Integer channelId)
Parameters
enquiryId
Internal TourCMS enquiry ID (perhaps via Search Enquiries)
channelId
ID for the channel that the enquiry belongs to
Example
' ID for the enquiry
Dim enquiryId As Integer = 12345
' ID for the channel (supplier) the enquiry belongs to
Dim channelId As Integer = 3;
' Call the TourCMS API
Dim doc As XmlDocument = myTourCMS.ShowEnquiry(enquiryId, 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 Enquiry
If status = "OK" Then
' Success! Print out the ID and Status Text
Dim sText As String =
doc.SelectSingleNode("//enquiry/status_text").InnerText;
Console.WriteLine(enquiryId & " - " & sText)
Else
' Failure! Print out the error text to debug
Console.WriteLine("Error: " & status)
End If
12345 - Triage
|
Querystring parameters
Querystring parameters
| Parameter | Notes |
| enquiry_id | ID number for the enquiry, for those using the API wrapper libraries this is passed as the first parameter (the second being the corresponding channel ID) |
Response fields
Returns the same information as the Enquiry Search method, just restricted to a single enquiry.
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 |
enquiry |
If an enquiry is found there will be an enquiry node containing the following child nodes.
| XML Node | Notes |
| channel_id | Channel ID |
| account_id | Account ID |
| enquiry_id | ID number for the Enquiry |
| customer_id | ID number for the Customer record |
| made_date_time | Date/Time when the enquiry was stored, this will be returned based on the Channels local time (i.e. varies accross Channels). Format: YYYY-MM-DD HH:MM:SS E.g 2011-08-18 18:52:01 |
| status | Integer representation of the current status of the enquiry. 0 = "Triage" (default initial status) 1 = "Open (Staff)" 2 = "Open (Customer)" 3 = "Open (Agent)" 4 = "Open (Supplier)" 5 = "Closed / Solved (Success / Booked)" 6 = "Solved (Failure / Not Booked)" |
| status_text | English language text version of the above status, e.g. "Triage" |
| type | Free text. "Brochure", "Tailor-made tour" request, contact us form etc. |
| category | Sub-category for type (e.g. if for a brochure, the brochure name) |
| detail | The main note for the enquiry (can be multi-line) |
| value | Value (e.g. financial value) (May not be money/numeric) |
| outcome | Text description of the outcome of the enquiry |
| followup_date | Date the enquiry is due to be followed up on (YYYY-MM-DD). Only returned if a followup date has been set by a member of staff. |
| closed_date_time | Date/time the enquiry was closed. Only returned if the Enquiry is closed (Status of 5 or 6). Format: YYYY-MM-DD HH:MM:SS E.g 2011-08-18 18:52:01 |
|
More information