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 > update agent

Update agent

Update some details on an internal agent

Notes

Designed to be used by tour operators only, not for use by Marketplace Agents.

REST info

Endpoint/c/agents/update
FormatsXML
ExampleURL: /c/agents/update.xml
 
POST data:
<?xml version="1.0"?>
<agent>
	<agent_id>12345</agent_id>
	<contact_name>J Bloggs</contact_name>
</agent>
VerbPOST


 Code samples

PHP examples use the PHP Client Library with SimpleXML

Description

object update_agent ( SimpleXmlElement $update_data, int $channel )


Parameters

$update
SimpleXmlElement containing the agent data
$channel
ID number for the channel

Example


// Set the channel
$channel = 3930;

// Start building the agent XML
$agent_data = new SimpleXMLElement('<agent />');

// Must set the Agent ID on the XML, so TourCMS knows which to update
$agent_data->addChild('agent_id', '12345');

// Set the name
$agent_data->addChild('contact_name', 'J Bloggs');

// Query the TourCMS API, updating the agent
$result = $tourcms->update_agent($agent_data, 3930);

// Check the result, will be "OK" if the tour was updated
switch ($result->error) {
     case "OK":
     // Print a success message
     print "Agent updated.";
     break;
     default:
     // Some other problem (could check error to see what)
     print "Sorry, unable to update agent.";
     print $result->error;
     break;
   }
			

Agent updated.
			

C# examples use the .Net Client Library

Code sample here soon

VB examples use the .Net Client Library

Code sample here soon

NodeJS examples use the NodeJS Wrapper

Code sample here soon

Looking for sample code in a different language? TourCMS and community provided API libraries


 Post fields

Post fields
XML NodeNotes
agent

The root XML element

XML NodeNotes
General
agent_idThe internal ID (not Marketplace Agent ID) for the agent
contact_nameName for the contact person
billingWho 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
balance_due_daysHow many days prior to booking start date the balance is due, e.g. "7". Set to blank to use channel defaults or "arrival" for payment on arrival.
commission_scheme_idThe commission scheme to place the agent on. If supplied must be a commission scheme id.
netrate_tier_idFor accounts using net rates, specify the tier to place the agent on. If supplied must be a valid tier id.
vatVAT / TVA / Sales tax number
internal_noteInternal note on the agent record, freetext
agent_credentialsAgent credentials, often used when carrying out a subsystem integration. Freetext however usually requires a very specific JSON or other format depending on the subsystem integration. Learn more.
tokenized_payment_details

Tokenized payment details against the customer to allow for further billing at a later date. Contact Palisis support to discuss.

XML NodeNotes
billing_idFreetext information representing the recurring billing id in whichever gateway/system holds the tokenized payment method
billing_id_typeTextual representation of the gateway or other system type which holds the tokenized payment method. Contact Palisis support to discuss.
payer_nameFreetext name of the payer, for display purposes. E.g. "Miss J Bloggs"
payment_method_typeFreetext name of the payment type, for display purposes. E.g. "Visa"
payment_method_numberA number representing the payment method used, e.g. for a credit card perhaps "41111........1111".
 
Must not include a full credit card number
payment_method_expiryExpiry date for the payment method, YYYY-MM format
Permissions
perm_override_sale_priceWhether the agent can override the sale price on the booking. Generally only used in the Agent Point of Sale app to let agents indicate how much they charged the customer (their net rate remains the same).
 
0 = Do not allow (default)
1 = Allow
perm_waive_cc_feeWhether the agent should be able to waive credit card feeds
 
0 = Standard credit card fees apply (Default)
1 = Allow this agent to waive credit card processing fees
2 = Always waive credit card fees for this agent
perm_checkinWhether the agent has any permission to handle check-ins / voucher redemption.
 
0 = No voucher redemption / bus check-in (Default)
1 = Can see information but no redemption / check-in
2 = Full redemption / check-in permission (includes bookings not made by this travel agent)
Notification emails
customer_notifications_post_onWhether to send post-travel emails (e.g. those asking for a review).
 
0 = Don't send post-booking emails
1 = Send post booking emails (Default)
customer_notifications_pre_onWhether to send pre-travel emails (e.g. Booking, payment and pre-trip emails).
 
0 = Don't send pre-travel emails
1 = Send pre-travel emails (Default)
supplier_notifications_onWhether to send supplier notification emails.
 
0 = Don't send supplier notification emails
1 = Send send supplier notification emails (Default)

 
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.
agent

An agent node, containing:

XML NodeNotes
agent_idThe internal ID (not Marketplace Agent ID) for the agent

More information