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 > customer login search

Customer Login Search

Verify a customer username/password are correct, retrieve the ID number for the matching customer

Notes

Designed to be used by Tour Operators (not for use by Marketplace Partners) perhaps to build a customer login area that could let customers view and modify their bookings, enquiries and contact details.

REST info

Call/c/customers/login_search
FormatsXML
Example/c/customers/login_search.xml?customer_username=jbloggs123&customer_password=password
VerbGET

Code samples

PHP examples use the PHP Client Library with SimpleXML

Description

object check_customer_login ( string $username, string $password, int $channel )

Parameters

$username
Username, perhaps entered by the customer in a login form
$password
Password, perhaps entered by the customer in a login form
$channel
ID number for the channel the customer belongs to

Example

// Set the channel ID
$channel = 3;

// Username, perhaps entered by the customer in a login form
$username = "jbloggs123"

// Password, perhaps entered by the customer in a login form
$password = "password"

// Query the TourCMS API
$result = $tourcms->check_customer_login($username, $password, $channel);

// Check the result, will be "OK" if login details are correct
if($result->error = "OK") {

	// Correct details, we can now get the customer ID from the XML
	$customer_id = $result->customer->customer_id;
	
	// Print a success message
	print "Login details are correct, the customer ID is ".$customer_id;
} else {
	
	// There has been a problem
	print "Sorry, unable to log you in";
}
Login details are correct, the customer ID is 12345

C# examples use the .Net Client Library

Overload list

XmlDocument CheckCustomerLogin ( string username, string password, int channelId )

Parameters

username
Username, perhaps entered by the customer in a login form
password
Password, perhaps entered by the customer in a login form
channelId
ID number for the channel the customer belongs to

Example

// Set the channel ID
int channelId = 3;

// Username, perhaps entered by the customer in a login form
string username = "jbloggs123"

// Password, perhaps entered by the customer in a login form
string pass = "password"

// Query the TourCMS API
XmlDocument doc = myTourCMS.CheckCustomerLogin(username, pass, channelId);

// Check the status 
string status = doc.SelectSingleNode("//error").InnerText;
           
if ( status == "OK" )
{
	// Get the customer_id
	string cId = doc.SelectSingleNode("//customer/customer_id").InnerText;
	Console.WriteLine("Login details are correct, the customer ID is " + cId);
} else {
  
    // There has been a problem
    Console.WriteLine("Sorry, unable to log you in");
} 
Login details are correct, the customer ID is 12345

VB examples use the .Net Client Library

Overload list

XmlDocument CheckCustomerLogin ( String username, String password, Integer channelId )

Parameters

username
Username, perhaps entered by the customer in a login form
password
Password, perhaps entered by the customer in a login form
channelId
ID number for the channel the customer belongs to

Example

' Set the channel ID
Dim channelId As Integer = 3

' Username, perhaps entered by the customer in a login form
Dim username As String = "jbloggs123"

' Password, perhaps entered by the customer in a login form
Dim pass As String = "password"

' Query the TourCMS API
Dim doc As XmlDocument = myTourCMS.CheckCustomerLogin(username, pass, channelId)

' Check the status 
Dim status As String = doc.SelectSingleNode("//error").InnerText
           
If status = "OK" Then

	' Get the customer_id
	Dim cId As String = doc.SelectSingleNode("//customer/customer_id").InnerText
	Console.WriteLine("Login details are correct, the customer ID is " + cId)

Else
  
    ' There has been a problem
    Console.WriteLine("Sorry, unable to log you in")
End If
Login details are correct, the customer ID is 12345

Try it

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


            
            

Querystring parameters

Querystring parameters
ParameterNotes
usernameThe customers username, perhaps via a login form
passwordThe customers password, perhaps via a login form

NB: The Channel ID is also required, this is passed in the API request header - or if using one of the wrapper libraries as the third parameter in the method.

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 the login details are correct there will be a customer node containing the following child nodes.

XML NodeNotes
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

More information