home > support > API > remove booking component

Remove booking component

Remove a tour from a regular (i.e. non-temporary, non-archived) booking.

REST info

Endpoint/c/booking/component/delete
FormatsXML
ExampleURL: /c/booking/component/delete.xml
 
POST data:
<?xml version="1.0"?>
<booking>
	<booking_id>12345</booking_id>
	<component_id>1</component_id>
</booking>
VerbPOST


 Code samples

PHP examples use the PHP Client Library with SimpleXML

Code sample here soon

C# examples use the .Net Client Library

Code sample here soon

VB examples use the .Net Client Library

Code sample here soon

NodeJS examples use the NodeJS Wrapper

Example

// Remove a component from a booking
TourCMS.removeBookingComponent({
    channelId: 3930,
    booking: {
      booking_id: 12920,
      component: {
          component_id: 8286001
      }
    },
    callback: function(response) {
      console.log(response.error);
    }
  });
OK

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


 Post fields

Post fields
XML NodeNotes
booking

The root XML element

XML NodeNotes
booking_idThe ID for the booking the component is on
component_idThe ID for the component to remove, obtained from the Show booking API

 
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