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 > Create Customer

Create Customer

Creates a new customer with the specified data.


Notes

For Tour Operator usage only (not accessible by Marketplace Agents).

REST info

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

Code samples

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


Description

object create_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 />');
      $customer->addChild('email', 'testEmail@testing.com');
      $customer->addChild('username', 'testEmail@testing.com');
      $customer->addChild('firstname', 'Tester');
      $customer->addChild('surname', 'TestTest');

      // Define the channel ID the tour belongs to.
      $channel = 3930;

      // Call TourCMS API, creating the new customer.
      $result = $tourcms->create_customer($customer, $channel);
      if ($result->error == 'OK') {
        print("Customer with the ID:". $result->customer_id. " has been successfully created.");
      } else {
        print("An error has ocurred: ".$result->error);
      }
    
New customer created

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 Create Customer 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 username is the only non-required field.

POST fields
XML NODENotes
customer

Create Customer node contains:

XML NodeNotes
email Email of the user. It needs to follow a email pattern to work (email@email.com).
username It's an optional field.
 
If sent an error will be returned if a customer with the same username already exists (also it must to be the same as the email).
 
If the username is not sent, the new customer username will be the email sent.
firstname User's first name.
surname User's surname name.

Response fields

Response fields
XML NodeNotes
response

Create Customer node contains:

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
aid Operator Account ID where the customer has been added
customer_id The new customer generated ID.

More information