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 Verification

Customer Verification

Verifies that a customer exists based on his email.


Notes

For Tour Operator usage only (not accessible by Marketplace Agents). To complete the verification process you'll need to send two different requests to our endpoint:

- The first one shall contain the user data, your preferred redirection and verification method and the token placement (non mandatory) .

- The second one shall contain the received token resulting from the first request to finish the verification process.

REST info

Endpoint/c/customer/verification
FormatsXML
Example/c/customer/verification.xml
VerbPOST

Code samples

PHP examples use the PHP Client Library with the return type set to SimpleXML


Description

object verify_customer(SimpleXmlElement $customer, int $channel)


Parameters

$customer
SimpleXmlElement containing the customer data.
$channel
ID number for the channel this customer belongs to.


Example


      // Create a new SimpleXMLElement with new customer details.
      $customer = new SimpleXMLElement('<customer />');
      $verificationMethods = $customer->addChild('verification_methods');
      $verificationMethods->addChild('method', 'CHECKEMAIL');
      $customer->addChild('username', 'testEmail@testing.com');
      $customer->addChild('redirect_url', 'https://yourRedirectPage.com/');
      $customer->addChild('token_placement', 'PATH');
      
      // Define the channel ID the customer belongs to.
      $channel = 3930;

      // Call TourCMS API, this will verify if the customer exists.
      $result = $tourcms->verify_customer($customer, $channel);
      if ($result->error == 'OK') {
        print("Customer found and token created.");
      } else {
        print("An error has ocurred: ".$result->error);
      }

      // Create a new SimpleXMLElement with new customer details and assigned token.
      $customerToken = new SimpleXMLElement('<customer />');
      $customerToken->addChild('token', 'YourUserToken');

      // Call TourCMS API, this will verify the token and customer data.
      $result = $tourcms->verify_customer($customerToken, $channel);
      if ($result->error == 'OK') {
        print("Customer found and verified");
      } else {
        print("An error has ocurred: ".$result->error);
      }

    
Customer verified

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

Try It Post Data Examples
Looking to try different POST examples? Try them out by clicking in the buttons below
Customer Verification / Token Verification

Try it

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

Take care, submitting this form will modify live data!


            
            

Querystring parameters

There are no querystring parameters.

Post fields

The following fields can be posted as XML when calling the API method. The token_placement is the only non-required field.

POST fields
XML NODENotes
customer

Accepted POST fields for the first request to the Customer Verification node:

XML NodeNotes
verification_methods

Available methods to verify the user

XML NodeNotes
methodPreferred verification method for the user.
CHECKEMAIL = sends an email to the user with a redirection URL that contains his login token
username The username of the user to verify.
redirect_url URL where the user will be redirected to complete the login process.
token_placement Desired way to return the user token your URL. If this parameter is not being passed, API will add as querystring by default:

QUERYSTRING = The token will return as a querystring in the URL. If the url already has a “token” param, the URL will be flagged as invalid returning INVALID_REDIRECT_URL as error_message

PATH = If no trailing / in the url API will add it.
POST fields
XML NODENotes
customer

Accepted POST fields for the second request to the Customer Verification node:

XML NodeNotes
token Received user token from the first request to this endpoint.

Response fields

Response fields
XML NodeNotes
response

First request response fields for the Customer Verification node:

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
message Message containing the request result if correctly processed.
Response fields
XML NodeNotes
response

Second request response fields for the Customer Verification node:

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_id Verified customer ID.

More information