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 > retrieve agent booking key

Retrieve agent booking key

Retrieve the booking agent key from a logged agent


Notes

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

After the agent has successfully logged in, pass the <private_token> received from Start New Agent Login to this endpoint to receive an <agent_booking_key> that can passed to Start New Booking to associate a new booking with this agent.

REST info

Endpoint/c/retrieve_agent_booking_key
FormatsXML
Example/c/retrieve_agent_booking_key.xml
VerbGET

Code samples

PHP examples use the PHP Client Library with SimpleXML

Description

SimpleXMLObject retrieve_agent_booking_key( $private_token, int $channel )

Parameters

$private_token
Private token
$channel
ID for the channel (supplier) is used by the agent that we want to know the booking key details

Example

// Set your channel ID
$channel_id = 3;

// Provide the private token
$private_token = "YOUR_PRIVATE_TOKEN";

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

// Check the response, will be "OK" if process was OK
switch ($response->error) {
case "OK":
// Print a success message
print "Your booking key is: " . $response->agent_booking_key;
break;
default:
// Some other problem (could check error to see what)
print "Sorry, unable to receive your booking key at this time.";
break;
}
      
        

Your booking key is: 12345

Looking for sample code in a different language?

TourCMS and community provided API libraries

Querystring parameters

Querystring parameters
ParametersDescriptions
private_token Your private token to verify if user is logged in

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
maid Marketplace_id of supplier channel.
name Agent name.
email Agent email.
agent_booking_key Agent booking key.
 
Pass this to Start New Booking as <agent_booking_key>, you will then not need to send a <booking_key>
booking_key_valid_for Key will be valid along a day. After that will be needed to retrieve another one.

More information