home > support > API > Update agent profile information
Update some details on an markeetplace agent
Designed to be used by agents only, not by tour operators.
Endpoint | /api/agent/profile/update.xml |
Formats | XML |
Example | URL: /api/agent/profile/update.xml POST data:
|
Verb | POST |
PHP examples use the PHP Client Library with SimpleXML
object update_agent_profile ( SimpleXmlElement $update_data)
// 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('name', 'new name');
// Set the name
$agent_data->addChild('short_description', 'new short description');
// Query the TourCMS API, updating the agent
$result = $tourcms->update_agent_profile($agent_data);
// 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
Enter your TourCMS API credentials below to call the Tour Pickups Routes Update Pickup endpoint.
Take care, submitting this form will modify live data!
XML Node | Notes | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
agent |
The root XML element
|
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. |