TourCMS, a leading online booking and channel management solution is operated by Palisis.

Contact Info

Palisis AG
Florastrasse 18A
8610 Uster
support@palisis.com
+41 44 533 40 40

Follow Us

home > support > API > Marketplace API > show customer

Show Customer

Show the details of an individual customer

Notes

Tour Operators can view all customer data, Marketplace Agents can view a subset based on their permission level.

Additional methods can be used to retrieve lists of bookings or enquiries the customer has made.

REST info

Endpoint/c/customer/show
FormatsXML
Example/c/customer/show.xml?customer_id=12345
VerbGET

Code samples

PHP examples use the PHP Client Library with SimpleXML

Description

object show_customer ( int $customer, int $channel )


Parameters

$customer
ID number for the customer
$channel
ID number for the channel the customer belongs to

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 Customer is in
$channel = 3;

// Set the customer ID
$customer = 12345

// Query the TourCMS API
$result = $tourcms->show_customer($customer, $channel);

// Print out the customers name
print $result->customer->customer_name;
Mr Joe Bloggs

C# examples use the .Net Client Library

Overload list

XmlDocument ShowCustomer (int customerId, int channelId)


Parameters

customerId
Internal TourCMS customer ID
channelId
ID for the channel that the enquiry belongs to

Example

// ID for the customer
int customerId = 12345;

// ID for the channel (supplier) the customer belongs to
int channelId = 3;

// Call the TourCMS API
XmlDocument doc = myTourCMS.ShowCustomer(customerId, channelId);

// Check the status of the response
string status = doc.SelectSingleNode("//error").InnerText;

// If the status is "OK" TourCMS will have returned our Customer
if ( status == "OK" )
{
	// Success! Print out the customers name
    string cust = doc.SelectSingleNode("//customer/customer_name").InnerText;
    Console.WriteLine(cName);
} else {
	// Failure! Print out the error text to debug
	Console.WriteLine("Error: " + status);
} 
Mr Joe Bloggs

VB examples use the .Net Client Library

Overload list

XmlDocument ShowCustomer (Integer customerId, Integer channelId)


Parameters

customerId
Internal TourCMS customer ID
channelId
ID for the channel that the enquiry belongs to

Example

' ID for the customer
Dim customerId 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.ShowCustomer(customerId, 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 Customer
If status = "OK" Then

	' Success! Print out the Customer name
    Dim cust As String =
    	doc.SelectSingleNode("//customer/customer_name").InnerText;
    Console.WriteLine(cName

Else

	' Failure! Print out the error text to debug
	Console.WriteLine("Error: " & status)

End If
Mr Joe Bloggs

NodeJS examples use the NodeJS Wrapper


Example

TourCMS.showCustomer({
  channelId: 3930,
  customerId: 3766892,
  callback: function(response) {
    console.log(response.customer.firstname + " " + response.customer.surname);
  }
});
Joe Bloggs

Looking for sample code in a different language? TourCMS and community provided API libraries

Try it

Enter your TourCMS API credentials below to call the Show Customer endpoint.


            
            

Querystring parameters

Querystring parameters
ParameterNotes
customer_idID number for the customer, for those using the API wrapper libraries this is passed as the first parameter (the second being the corresponding channel ID)

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
customer

If a customer is found there will be a customer node containing the following child nodes.

XML NodeNotes
Fields available to Partners with Permission Level 2 or above ?
customer_idID number for the Customer record
channel_idChannel ID
account_idAccount ID
titleTitle (e.g. Mr, Mrs, Miss etc)
firstnameFirstname
middlenameMiddle name
surnameSurname
customer_nameConstructed from title, firstname, middle name and surname
staff1 if customer is a member of staff, otherwise 0
Fields available to Partners with Permission Level 3 or above ?
perm_emailWhether the customer is opted in to email marketing or not.
 
1 = Yes
0 = No
emailEmail address
tel_homeTel home / evening (other phone number fields are listed in the "Not so commonly used fields" section below, however if only taking one phone number then use this field)
addressAddress (can be multi-line)
tel_workTel work / day
tel_mobileTel mobile
tel_smsTel sms
faxFax number
cityCity
countyCounty / State
postcodePostcode / Zipcode
country2 digit country code (uppercase).
country_textEnglish text representation of the customer country code
nationality2 digit country code (uppercase).
nationality_textEnglish text representation of the customer nationality code
genderThe customers gender.
 
Will be blank if gender is unknown, otherwise one of the following digits:
m = Male
f = Female
x = Indeterminate
dobDate of Birth (YYYY-MM-DD)
agecatAge category - 1 digit code (i-Infant, c-Child, a-Adult, s-Senior).
agecat_textEnglish text representation of the age category
pass_numPassport number
pass_issuePassport place of issue
pass_issue_datePassport issue date (YYYY-MM-DD)
pass_expiry_datePassport expiry date (YYYY-MM-DD)
wherehearWhere did the customer hear about us
contact_noteContact note (e.g. don't call before 8pm)
dietDietary requirements
medicalMedical conditions
nok_nameEmergency contact name
nok_relationshipEmergency contact relationship
nok_telEmergency contact telephone number
nok_contactEmergency contact other note (can be multi-line)
agent_customer_refA travel agent reference number / ID for this customer, e.g. perhaps the ID for this customer in their own system
Fields available to Tour Operators only ?
customer_username
customer_password
Username and password as used by the customer to log into the online booking engine. Customer entered usernames/passwords can be passed to the customer login search API method to build a customer login area.
agent_nameAgent name (if an agent is set on the booking)
agent_codeAgent code (if an agent is set on the booking)
agent_idTourCMS internal ID for agent (if an agent is set on the booking)
tokenized_payment_details

Tokenized payment details against the customer to allow for further billing at a later date.

XML NodeNotes
billing_idFreetext information representing the recurring billing id in whichever gateway/system holds the tokenized payment method
billing_id_typeTextual representation of the gateway or other system type which holds the tokenized payment method. Contact Palisis support to discuss.
payer_nameFreetext name of the payer, for display purposes. E.g. "Miss J Bloggs"
payment_method_typeFreetext name of the payment type, for display purposes. E.g. "Visa"
payment_method_numberA number representing the payment method used, e.g. for a credit card perhaps "41111........1111", in the case of credit cards this should be a mask and not the full number.
payment_method_expiryExpiry date for the payment method, YYYY-MM format
custom_fields

If any custom fields are configured then a custom_fields node will be returned containing the following:.

XML NodeNotes
field

If any custom fields are configured then a custom_fields node will be returned containing the following:.

XML NodeNotes
nameCustom field name E.g. InsideLeg
valueValue for the custom field E.g. 32 inches

? Permission levels

Tour Operators will be able to view all data. The data visible to Marketplace Partners depends on the permission level granted on that particular channel (set by the channel operator when they connect). Marketplace Partners granted permission level 3 can see everything except the customer username and password (and agent details - however they would merely point to the Partners own details), those granted permission level 2 can only see basic customer name details, those granted permission level 1 cannot view any customer information.

Remember, Marketplace Partners will only be able to see customers who have their agent record set (i.e. they came to the Operator via a click/enquiry/booking from the Marketplace Partner).

More information