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 > Travel agent Search

Search travel agents

Get a list of travel agents. Use if developing a solution to allow creation of bookings assigned to specific travel agents.

Notes

Allows searching by several criteria, returns basic information about the agent plus a booking_key that can be used when creating bookings.
 
For use by tour operators only, not available for those accessing the API with Marketplace Agent credentials.

REST info

Call/c/agents/search
FormatsXML
Example/p/agents/search.xml?q=Example
VerbGET

Code samples

PHP examples use the PHP Client Library with SimpleXML

Description

object search_agents ( string $params, int $channel )

Parameters

$params
	Search querystring, see possible values in the table below
$channel
	Your channel

Example

// Channel ID
$channel = 3930;

// Optionally define search parameters
// Here we are just returning agents whose name/code contains the text "Example"
$params = "q=Example";

// Query the TourCMS API
$result = $tourcms->search_agents($params, $channel);

// Loop through each agent
foreach($results->agent as $agent) {
  // Print out the name and code
  print $agent->agent_name." ( ".$agent->agent_code." ) ";
  print "<br />";
}
Example Agent (EXAMP1)
Another Example (EXAMP2)

C# examples use the .Net Client Library

VB examples use the .Net Client Library

Try it

Enter your TourCMS API credentials below to call the Search Agents endpoint.


            
            

Querystring parameters

Querystring parameters
ParameterNotes
orderDefault order is by name, set to toprecent to order by number of recent bookings
agent_id The account specific Agent ID for the agent.
agent_marketplace_id The system-wide TourCMS Marketplace ID (maid) for the agent.
agent_groupLoad agents from a specific group. Exact match only
qSearch agent name/code, returns partial matches
filterSet to staff_ui to limit results to those agents that have had bookings assigned to them by staff - useful if an account contains many agents with only a small subset that will be assigned bookings by staff
per_pageNumber of results to return per page. Max is 500.
pageInteger for which page number to return. Default is page 1
billing

Integer with required value depending on billing type.

Who pays the balance.

2 = Retail travel agent (Trade sale - the travel agent responsible for paying for the booking) If the booking is value of 100 and the travel agent is on 10% commission the travel agent will pay 90 Ideal for retail travel agents who must pay at the point of booking (like customers do).

-1 = Trusted travel agent (Trade sale - the travel agent responsible for paying for the booking) If the booking is value of 100 and the travel agent is on 10% commission the travel agent will pay 90 Web bookings will be immediately confirmed EVEN without payment.

1 = Lead customer (Customer will pay - but net of any commission due on the booking) If the booking is value of 100 and the travel agent is on 10% commission the customer will pay 90.

0 = Lead customer (Advertising tracking or web affiliate style agent - customer will pay the full value) If the booking is value of 100 and the travel agent is on 10% commission the customer will pay 100 and the travel agent will subsequently be paid 10. Ideal for web affiliates and hotel concierges.

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
total_agent_count Total number of agents returned by the search (i.e. not just the number on this page)
agent

There will be one agent node for each result on this page.

Each agent node contains the following child nodes.

XML NodeNotes
agent_idInternal system ID number for the agent
channel_idChannel ID
account_idAccount ID
agent_codeCode for the agent, freetext (e.g. "TOURCMS16980")
agent_nameName for the agent, freetext (e.g. "Test Agent"
agent_group
total_bookingsTotal number of bookings associated with the agent
recent_bookingsNumber of recent bookings associated with the agent
last_bookedDate the last booking made by the agent was created. YYYY-MM-DD.
booking_keyPass to Start new booking to create a booking assigned to this agent

More information