home > support > API > Marketplace API > update tour

Update Tour

Update the details on an existing Tour.


Notes

Currently only supports a subset of fields. Contact us if you need more for a specific project.

Designed to be used by Tour Operators (not for use by Marketplace Agents).

REST info

Endpoint/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 samples

PHP examples use the PHP Client Library with SimpleXML

The most common field to update is the "Product page URL", so a simplified wrapper call has been included in the client library and is documented here.

Description

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


Parameters

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

Example

// Define the ID of the Tour we wish to update
$tour = 1;

// Define the channel ID this Tour belongs to
$channel = 3930;

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

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

print $result->error;
OK

C# examples use the .Net Client Library

The most common field to update is the "Product page URL", so a simplified wrapper call has been included in the client library and is documented here.

Overload list

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


Parameters

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

Example


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

// ID for the channel the Tour 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
string status = doc.SelectSingleNode("//error").InnerText;
Console.WriteLine(status);
OK

VB examples use the .Net Client Library

The most common field to update is the "Product page URL", so a simplified wrapper call has been included in the client library and is documented here.

Overload list

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


Parameters

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

Example


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

' ID for the channel the Tour 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
Dim status As String = doc.SelectSingleNode("//error").InnerText
Console.WriteLine(status)
OK

NodeJS examples use the NodeJS Wrapper


Example

// Change the URL for Tour 1
TourCMS.updateTour({
tour: {
  tourId: 1,
  tour_url: '/tours/example_tour_1/'
},
callback: function(response) {
  console.log(response.error);
}
});
OK

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

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, should be supplied relative to the base URL you have configured in TourCMS. The only field that can currently be updated.
supplier_tour_codeThe supplier set tour code. This field is ideal if you are syncronising TourCMS with an external reservation system as this could be the external reservation system tour ID.

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 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 record

More information