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 |
Formats | XML |
Example | URL: /c/agents/update.xml
POST data:<?xml version="1.0"?>
<agent>
<agent_id>12345</agent_id>
<contact_name>J Bloggs</contact_name>
</agent>
|
Verb | POST |
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 />');
// 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.
Post fields
Post fields
XML Node | Notes |
agent |
The root XML element
XML Node | Notes |
General |
agent_id | The internal ID (not Marketplace Agent ID) for the agent |
contact_name | Name for the contact person |
billing | 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
|
balance_due_days | How 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_id | The commission scheme to place the agent on. If supplied must be a commission scheme id. |
netrate_tier_id | For accounts using net rates, specify the tier to place the agent on. If supplied must be a valid tier id. |
vat | VAT / TVA / Sales tax number |
internal_note | Internal note on the agent record, freetext |
agent_credentials | Agent 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 Node | Notes |
billing_id | Freetext information representing the recurring billing id in whichever gateway/system holds the tokenized payment method |
billing_id_type | Textual representation of the gateway or other system type which holds the tokenized payment method. Contact Palisis support to discuss. |
payer_name | Freetext name of the payer, for display purposes. E.g. "Miss J Bloggs" |
payment_method_type | Freetext name of the payment type, for display purposes. E.g. "Visa" |
payment_method_number | A 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_expiry | Expiry date for the payment method, YYYY-MM format |
|
Permissions |
perm_override_sale_price | Whether 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_fee | Whether 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_checkin | Whether 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_on | Whether 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_on | Whether 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_on | Whether to send supplier notification emails.
0 = Don't send supplier notification emails
1 = Send send supplier notification emails (Default) |
|
Response fields
Response fields
XML Node | Notes |
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 Node | Notes |
agent_id | The internal ID (not Marketplace Agent ID) for the agent |
|
More information