home > support > API > Marketplace API > Customer Verification
Verifies that a customer exists based on his email.
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.
Endpoint | /c/customer/verification |
Formats | XML |
Example | /c/customer/verification.xml |
Verb | POST |
PHP examples use the PHP Client Library with the return type set to SimpleXML
object verify_customer(SimpleXmlElement $customer, int $channel)
// 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 |
Enter your TourCMS API credentials below to call the Customer Verification endpoint.
Take care, submitting this form will modify live data!
There are no querystring parameters.
The following fields can be posted as XML when calling the API method. The token_placement is the only non-required field.
XML NODE | Notes | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
customer |
Accepted POST fields for the first request to the Customer Verification node:
|
XML NODE | Notes | ||||
---|---|---|---|---|---|
customer |
Accepted POST fields for the second request to the Customer Verification node:
|
XML Node | Notes | ||||||||
---|---|---|---|---|---|---|---|---|---|
response |
First request response fields for the Customer Verification node:
|
XML Node | Notes | ||||||||
---|---|---|---|---|---|---|---|---|---|
response |
Second request response fields for the Customer Verification node:
|