home > support > API > Method list > Delete tour document
Remove a document (and related description) from a Tour.
Want to replace the document instead? See the Tour file upload endpoint.
Endpoint | /c/tour/document/delete |
Formats | XML |
Example | /c/tour/document/delete.xml |
Verb | POST POST data:
|
PHP examples use the PHP Client Library with the return type set to SimpleXML
object delete_tour_document(int $channel, SimpleXMLElement $document_info)
// The channel ID this tour belongs to.
$channel = 3930;
// Start building the XML
$document_info = new SimpleXMLElement('<file />');
// Define the ID of the Tour we wish to delete the document from
$image_info->addChild('tour_id', '1');
// And the Document ID (Currently only 1 document can be uploaded, so always 1)
$image_info->addChild('document_id', '1');
// Call TourCMS API, deleting the image
$result = $tourcms->delete_tour_document($channel, $document_info);
if ($result->error == "OK") {
print "Document deleted";
} else {
print $result->error;
}
Document deleted
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. |