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
Formats XML
Example /c/customer/show.xml?customer_id=12345
Verb GET

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
Parameter Notes
customer_id ID 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 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
customer

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

XML Node Notes
Fields available to Partners with Permission Level 2 or above ?
customer_id ID number for the Customer record
channel_id Channel ID
account_id Account ID
title Title (e.g. Mr, Mrs, Miss etc)
firstname Firstname
middlename Middle name
surname Surname
customer_name Constructed from title, firstname, middle name and surname
staff 1 if customer is a member of staff, otherwise 0
Fields available to Partners with Permission Level 3 or above ?
perm_email Whether the customer is opted in to email marketing or not.
 
1 = Yes
0 = No
email Email address
tel_home Tel 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)
address Address (can be multi-line)
tel_work Tel work / day
birth_place Place of birth
tel_mobile Tel mobile
tel_sms Tel sms
fax Fax number
city City
county County / State
postcode Postcode / Zipcode
country 2 digit country code (uppercase).
country_text English text representation of the customer country code
nationality 2 digit country code (uppercase).
nationality_text English text representation of the customer nationality code
gender The customers gender.
 
Will be blank if gender is unknown, otherwise one of the following digits:
m = Male
f = Female
x = Indeterminate
dob Date of Birth (YYYY-MM-DD)
agecat Age category - 1 digit code (i-Infant, c-Child, a-Adult, s-Senior).
agecat_text English text representation of the age category
age

Of the customer at time of return / end of booking.

XML NodeNotes
age_unit Either days, months, weeks or years. Generally speaking use years, however for younger travellers where more granularity is used, weeks or months may be more appropriate.
age_value Customer age at end of booking / return travel specified by age_unit, will be a whole integer
pass_num Passport number
pass_issue Passport place of issue
pass_issue_date Passport issue date (YYYY-MM-DD)
pass_expiry_date Passport expiry date (YYYY-MM-DD)
wherehear Where did the customer hear about us
contact_note Contact note (e.g. don't call before 8pm)
diet Dietary requirements
medical Medical conditions
nok_name Emergency contact name
nok_relationship Emergency contact relationship
nok_tel Emergency contact telephone number
nok_contact Emergency contact other note (can be multi-line)
agent_customer_ref A 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_name Agent name (if an agent is set on the booking)
agent_code Agent code (if an agent is set on the booking)
agent_id TourCMS 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 Node Notes
billing_id Freetext information representing the recurring billing id in whichever gateway/system holds the tokenized payment method
billing_id_type Textual representation of the gateway or other system type which holds the tokenized payment method. Contact Palisis support to discuss.
payer_name Freetext name of the payer, for display purposes. E.g. "Miss J Bloggs"
payment_method_type Freetext name of the payment type, for display purposes. E.g. "Visa"
payment_method_number A 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_expiry Expiry 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 Node Notes
field

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

XML Node Notes
name Custom field name E.g. InsideLeg
value Value for the custom field E.g. 32 inches
external_customer_profile

If the user has any external customer profile this node will contain next childs

XML Node Notes
service

External customer profile service information

XML Node Notes
name Customer Profile Service name E.g. Autoura
profile_id Customer ID in profile service E.g. profile-xxxx-xxxx-xxxx

? 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