home > support > API > Marketplace API > API: delete_tour
Deletes a tour from TourCMS.
For Tour Operator usage only (not accessible by Marketplace Agents).
Tours can only be deleted if they have no future departures or future bookings.
Endpoint | /c/tours/delete |
Formats | XML |
Example | /c/tours/delete |
Verb | POST |
PHP examples use the PHP Client Library with the return type set to SimpleXML
object delete_tour(int $tour, int $channel)
// The id of the tour is going to be deleted.
$tour = 1;
// Define the channel ID this tour belongs to.
$channel = 3930;
// Call TourCMS API, deleting an existing tour.
$result = $tourcms->delete_tour($tour, $channel);
if ($result->error == "OK") {
print "TOUR DELETED SUCCESSFULLY";
} else {
print $result->error;
}
TOUR DELETED SUCCESSFULLY
Looking for sample code in a different language? TourCMS and community provided API libraries
Enter your TourCMS API credentials below to call the Delete Tour endpoint.
Take care, submitting this form will modify live data!
Parameter | Notes |
---|---|
id | Tour ID you want to delete. |
XML Node | Notes |
---|---|
request | Confirmation of the request that you sent |
error | Any error message returned, if there is no error and the tour has been deleted error will just contain the text OK |