home > support > API > Marketplace API > update tour/hotel

Tour/Hotel Update

PurposeUpdate the details on an existing Tour/Hotel
NotesCurrently only supports updating of the Tour "Product page URL".
 
Designed to be used by Tour Operators (not for use by Marketplace Partners).
REST info Call/c/tour/update
FormatsXML
ExampleURL: /c/tour/update.xml
 
POST data:
<?xml version="1.0"?>
<tour>
	<tour_id>12345</tour_id>
	<tour_url>/tours/1_example_tour/</tour_url>
</tour>
VerbPOST
Code

PHP examples use the PHP Client Library with SimpleXML

Currently the only field that can be updated is the "Product page URL" so a simplified wrapper call has been included in the client library and is documented below.

Description

object update_tour_url ( int $tour, int $channel, string $tour_url )

Parameters

$tour
ID number for the tour/hotel to be updated
$channel
ID number for the channel the tour/hotel belongs to
$tour_url
The new Tour URL, supplied as a relative URL

Example

// Define the ID of the Tour/Hotel we wish to update
$tour = 1;
			
// Define the channel ID this Tour/Hotel belongs to
$channel = 3930;

// Define the new product page URL
$tour_url = "/tours/1_example_tour/";

// Call TourCMS API, updating the Tour/Hotel URL
$result = $tourcms->update_tour_url($tour, $channel, $tour_url);

print $result->error;
OK

C# examples use the .Net Client Library

Currently the only field that can be updated is the "Product page URL" so a simplified wrapper call has been included in the client library and is documented below.

Overload list

XmlDocument UpdateTourUrl (int tourId, int channelId, string tourUrl)

Parameters

tourId
ID number for the tour/hotel to be updated
channelId
ID number for the channel the tour/hotel belongs to
tourUrl
The new Tour URL, supplied as a relative URL

Example


// ID for the Tour/Hotel we want to update
int tourId = 1;

// ID for the channel the Tour/Hotel belongs to
int channelId = 3930;

// The new Product page URL
// Relative to the base URL configured in TourCMS
string tourUrl = "/tours/1_example_tour/";

// Call the API
XmlDocument doc = myTourCMS.UpdateTourUrl(tourId, channelId, tourUrl);

// Get the response status, will be "OK" if TourCMS updated the Tour/Hotel
string status = doc.SelectSingleNode("//error").InnerText;
Console.WriteLine(status);
OK

VB examples use the .Net Client Library

Currently the only field that can be updated is the "Product page URL" so a simplified wrapper call has been included in the client library and is documented below.

Overload list

XmlDocument UpdateTourUrl
	(Integer tourId, Integer channelId, String tourUrl)

Parameters

tourId
ID number for the tour/hotel to be updated
channelId
ID number for the channel the tour/hotel belongs to
tourUrl
The new Tour URL, supplied as a relative URL

Example


' ID for the Tour/Hotel we want to update
Dim tourId As Integer = 1

' ID for the channel the Tour/Hotel belongs to
Dim channelId As Integer = 3930

' The new Product page URL
' Relative to the base URL configured in TourCMS
Dim tourUrl As String = "/tours/1_example_tour/"

' Call the API
Dim doc As XmlDocument = myTourCMS.UpdateTourUrl(tourId, channelId, tourUrl)

' Get the response status, will be "OK" if TourCMS updated the Tour/Hotel
Dim status As String = doc.SelectSingleNode("//error").InnerText
Console.WriteLine(status)
OK

Querystring parameters

There are no querystring parameters.

Post fields

Post fields
XML NodeNotes
tour

The root XML element, can contain any of the following child nodes.

XML NodeNotes
tour_idTourCMS Internal ID number for the Customer record, this must be provided
tour_urlThe "Product page URL" for this Tour/Hotel, should be supplied relative to the base URL you have configured in TourCMS. The only field that can currently be updated.

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

If the Tour/Hotel was updated there will be a tour node containing the following child nodes.

XML NodeNotes
channel_idChannel ID
account_idAccount ID
tour_idID number for the Tour/Hotel record

More information

© 2003-2012 Travel UCD Limited. All rights reserved. TourCMS® is a registered trademark of Travel UCD Limited, United Kingdom. View Privacy policy.

Free 1 hour webinar - An introduction to TourCMS, 31st May @ 3pm GMT / 4pm BST (UK). Check in your timezone and register »