home > support > API > Method list > Upload tour file > Process uploaded file
Tell TourCMS about a file you have uploaded, instructing TourCMS to process that file.
Endpoint | /c/tours/files/upload/process |
Formats | XML |
Example | /c/tours/files/upload/process.xml |
Verb | POST POST data:
|
PHP examples use the PHP Client Library with the return type set to SimpleXML
object tour_upload_file_process(int $channel, simpleXmlElement $upload_info)
// 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
There are no querystring parameters.
XML Node | Notes | ||||||||
---|---|---|---|---|---|---|---|---|---|
file |
The root XML element, can contain any of the following child nodes.
|
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. |