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 > start new agent login

Start new agent login

Start a new log into tourcms as agent


Notes

Part of a series of API endpoints enabling Travel Agent Login to API powered websites.

Call this endpoint to receive a link to the hosted Travel Agent login page.


REST info

Endpoint/c/start_agent_login
FormatsXML
Example/c/start_agent_login.xml
VerbPOST

Code samples

PHP examples use the PHP Client Library with SimpleXML

Description

SimpleXMLObject start_new_agent_login ( $params, int $channel )

Parameters

$params
Object with needed info to start a new login
$channel
ID for the channel the booking is made with

Example

// Set your channel ID
$channel_id = 3;

// Set your destination_url
// The customer will be redirected here after login
$final_url = "YOUR_DESTINATION_URL";

// Set your cancel page url
// The customer will be sent here if they cancel login
$cancel_page_url = "CANCEL_PAGE_URL";

// Generate xml with your parameters
$params = new SimpleXMLElement('<params />');
$params->final_url = $final_url;
$params->cancel_page_url = $cancel_page_url;

// Query the TourCMS API
$response = $tourcms->start_new_agent_login($params, $channel_id);

// Check the response, will be "OK" if process was OK
switch ($response->error) {
  case "OK":
    // Print login page URL
    // (In reality you would store the tokens and then redirect)
    print $response->login_page_url;
    break;
  default:
    // Some other problem (could check error to see what)
    print "Unable to log in.";
}  
https://mp.tourcms.com/.....

Looking for sample code in a different language?

TourCMS and community provided API libraries

Querystring parameters

There are no querystring parameters.

Post fields

Post fields
XML NodeNotes
final_url The URL TourCMS should redirect the user to after they log in.
cancel_page_url The URL TourCMS should redirect the user to if they cancel.

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
login_page_url URL to login page. Redirect the user to this URL.
public_token The public token for this login attempt.
private_token The private token for this login attempt. Do not display this in public, store this alongisde the public token.
 
When the user returns to you after successful login the public_token will be provided in the querystring. Send the corresponding private_token to the Retrieve Agent Booking Key endpoint.

More information