home > support > API > update booking component

Update booking component

Change some details of a particular booking component (tour/option/fee)

Notes

Designed to be used by tour operators only, Marketplace Agents cannot update booking components.

REST info

Endpoint/c/booking/component/update
FormatsXML
ExampleURL: /c/booking/component/update.xml
 
POST data:
<?xml version="1.0"?>
<booking>
	<booking_id>12345</booking_id>
	<component>
		<component_id>1</component_id>
		<sale_quantity>50</sale_quantity>
	</component>
</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

// Update a component to a booking
TourCMS.updateBookingComponent({
    channelId: 3930,
    booking: {
      booking_id: 12920,
      component: {
          component_id: 8286216,
          sale_quantity: 3
      }
    },
    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

The root XML element

XML NodeNotes
component_idThe ID for the component to remove, obtained from the Show booking API
date_idQuick change the component from one departure to another. Does not sanity check availability (you can do that first with Check Availability), prices, costs, validity of any Options etc - so use with caution.
noteFreetext note related to this component. For example if this is a hotel transfer, this could be the customers flight details
pickup_keySelect a pickup point. Pickup keys can be obtained via Check Availability, if setting to a freetext pickup, that key can also be obtained via Tour Show.
 
To remove an existing hotel pickup from the component set the value of this node to REMOVE
pickup_noteGenerally used to supply freetext pickup info (when combined with the pickup on request key)
pickup_timeOverride the configured route code for the selected pickup
pickup_route_codeOverride the configured time for the pickup, e.g. 20:00
supplier_refSupplier reference for this component, often a booking id for a third party downstream system
sale_quantityQuantity of the component booked
sale_quantity_ruleEither PERSON if the sale_price is multiplied by the quantity, or GROUP if the sale_price is the total
sale_priceThe price, either per person or per group (depending on the above)
net_quantity_ruleEither PERSON if the net_price is multiplied by the quantity, or GROUP if the net_price is the total
net_priceThe net price, either per person or per group (depending on the above)
customer_paymentOn bookings where the agent is set to pay the balance, specific items can be added as customer payable by setting this field to 1
replies

If any Questions are to be answered, add a replies node containing:

XML NodeNotes
reply

A reply node for each question to be answered containing:

XML NodeNotes
question_
key
Question key identifying the question to be answered, obtained from Check Tour Availability.
answers

An answers node containing:

XML NodeNotes
answer

An answer node for each answer to the question:

XML NodeNotes
answer_
value
The answer

 
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