TourCMS, a leading online booking and channel management solution is operated by Palisis.

Contact Info

Palisis AG
Florastrasse 18A
8610 Uster
support@palisis.com
+41 44 533 40 40

Follow Us

home > support > API > Marketplace API > tours_pickup_routes_pickup_add

Add Pickup to Tour Pickup Route

Add a pickup to a pickup route of a tour.


Notes

For Tour Operator usage only (not accessible by Marketplace Agents).

REST info

Endpoint/api/tours/pickup/routes/pickup_add
FormatsXML
Example/api/tours/pickup/routes/pickup_add.xml
VerbPOST

Code samples

PHP examples use the PHP Client Library with the return type set to SimpleXML


Description

tours_pickup_routes_add_pickup($data, $channel)


Parameters

$data
SimpleXmlElement containing the pickup and route data (must include tour ID, route ID and pickup ID)
$channel
ID number for the channel the pickup route belongs to.


Example


// Create a new SimpleXMLElement to hold the pickup details
$data = new SimpleXMLElement('<pickup/>');
$data->addChild('tour_id', 70);
$data->addChild('route_id', 2);
$data->addChild('pickup_id', 3);
$data->addChild('time', '08:45');

// Define the channel ID the pickup route belongs to.
$channel = 3930;

// Call TourCMS API to add a pickup to a pickup route.
$result = $tourcms->tours_pickup_routes_add_pickup($data, $channel);

// Check the result, will be "OK" if a route was updated
switch ($result->error) {
    case "OK":
        // Print a success message
        print "Thanks, the pickup has been added to route.";
        break;
    case "NOTOK":
        // Some other problem (could check error to see what)
        print $result->error_message;
        break;
}
Thanks, the pickup has been added to route.

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

Try it

Enter your TourCMS API credentials below to call the Add Pickup to Tour Pickup Route endpoint.

Take care, submitting this form will modify live data!


            
            

Querystring parameters

There are no querystring parameters.

Post fields

The following fields can be posted as XML when calling the API, all fields are required fields.

Any fields not present in the XML will not be updated, to clear a field you will need to add it to the XML but leave it's contents blank.

Post fields
XML Node Notes
pickup

The root XML element, can contain any of the following child nodes.

XML Node Notes
tour_id Required. TourCMS Internal ID number for the Tour, this must be provided
pickup_id Required. TourCMS Internal ID number for the Route's Pickup, this must be provided
time Required. Time for the pickup, this must be provided. Can be empty string. IF empty string time for the pickup will be unset. If account is not set to allow flexible time input, it must end in a multiple of 5.
route_id NOT Required. TourCMS Internal ID number for the Tour's Route, this must be provided if we want to add a new tour pickup in one defined route.
If not passed or route does not exist, pickup will be added in next route, it means a new tour pickup route will be created for the tour.


The Channel ID is also passed via the request header, this is required as Tour IDs are unique within a particular channel (supplier) rather than being unique system wide.

Response fields

Response fields
XML NodeNotes
request Confirmation of the request that you sent
error Error status OK/NOTOK
error_message Any error message returned. Will only be returned if error is NOTOK
tour_id Tour ID
channel_id Channel ID
pickup_route

Each pickup route node contains the following child nodes.

XML NodeNotes
route_id Route ID
pickup_point

Each pickup point node contains the following child nodes.

XML NodeNotes
pickup_id Pickup ID
unique_id Pickup unique identifier in the tour pickup route

More information