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 > Method list > Upload tour file > Process uploaded file

Process uploaded file

Tell TourCMS about a file you have uploaded, instructing TourCMS to process that file.

REST info

Endpoint/c/tours/files/upload/process
FormatsXML
Example/c/tours/files/upload/process.xml
VerbPOST
 
POST data:
<?xml version="1.0"?>
<file>
	<url>https://example.s3.amazonaws.com/example</url>
	<description>Descriptive text for file</description>
	<copy_to_other_channels_same_language>1</copy_to_other_channels_same_language>
</file>

Code samples

PHP examples use the PHP Client Library with the return type set to SimpleXML


Description

object tour_upload_file_process(int $channel, simpleXmlElement $upload_info)


Parameters

$channel
ID number for the channel this tour belongs to.
$upload_info
SimpleXMLElement containing the file info (s3 URL, description/alt text, whether to copy descriptions to all channels with same language)


Example


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

// Start building the XML
$upload_info = new SimpleXMLElement('<file />');

// Define the ID of the Tour we wish to update
$upload_info->addChild('upload_url', htmlspecialchars('https://example.s3.com/example'));

// Set new start time
$upload_info->addChild('description', 'Our state of the art, air conditioned bus');

// Set new end time
$upload_info->addChild('copy_to_other_channels_same_language', '1');

// Call TourCMS API, to start processing the tour file upload.
$result = $tourcms->tour_upload_file_process($channel, $upload_info);
if ($result->error == "OK") {
    print "File uploaded successfully";
} else {
    print $result->error;
}
    
File uploaded successfully

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
file

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

XML NodeNotes
upload_urlThe S3 URL the file was uploaded to (obtained via File get URL). Mandatory.
descriptionThe description to be shown to users alongside or linking to the file
copy_to_other_channels_same_languageFor images: Whether to copy the description to other channels of the same language
 
For files: Whether to copy the description AND file to other channels of the same language
 :
1 for yes, 0 for no.

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.

More information