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 > API: create_tour_geopoint

Create a new tour geopoint

Creates a new tour geopoint.


Notes

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

REST info

Endpoint/api/tours/geos/create
FormatsXML
Example/api/tours/geos/create
VerbPOST

Code samples

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


Description

object create_tour_geopoint(SimpleXmlElement $geopoint, int $channel)


Parameters

$geopoint
SimpleXmlElement containing the tour geopoint data.
$channel
ID number for the channel this tour geopoint belongs to.


Example


      // Create a new SimpleXMLElement with new tour geopoint details.
      $geopoint = new SimpleXMLElement('<geopoint />');
      $geopoint->tour_id = 68;
      $geopoint->label = 'label';
      $geopoint->geocode = '-12,43';
      $geopoint->search_term = 'search';
      $geopoint->google_place_id = '12345';
      $geopoint->google_place_name = 'NAME1';
      $geopoint->google_place_address = 'address 1';
      $geopoint->can_start_end_here = 0;
      $geopoint->loc_relation = 1;
      $geopoint->loc_type = 'm';
      $geopoint->geo_order = 1;
      $geopoint->google_place_refreshed = date('Y-m-d H:i:s');
      // Define the channel ID the tour belongs to.
      $channel = 3930;
      // Call TourCMS API, creating the new tour geopoint.
      $result = $tourcms->create_tour_geopoint($geopoint, $channel);
      if ($result->error == "OK") {
        print "New geopoint created";
      } else {
        print $result->error;
      }
    
New geopoint created

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

Querystring parameters

There are no querystring parameters.

Post fields

The following fields can be posted as XML when calling the API method. The tour_id is the only required field.

POST fields
XML NODENotes
geocode

Tour geopoint node contains:

XML NodeNotes
tour_id The id of the tour id where we are going to create the new tour geopoint.This is a mandatory field.
label Label for the geopoint, e.g. "Meet in the reception lounge"
geocode lat,lng geocode point.
google_place_id Google place identifier for the geopoint.
search_term To be defined
google_place_name Name of the geopoint in Google Places.
google_place_address Addres of the geopoint in Google Places.
can_start_end_here 1/0
Where the customer can start/end the Tour/Itinerary at this point.
 
0 = No (could just be a tour map calling point)
1 = Yes (could be a hop on / hop off bus stop)
loc_relationHow the geo point relates to the tour.
 
0 = No Admission
1 = Admission Granted
2 = Supplementary Add-on
loc_type s / e / m
If is a start point. An end point. Or a midpoint.
 
s = Start point (A tour start point)
e = End point (A tour end point)
m = A middle point. Could be a hop on / hop off bus stop or a tour map calling point.
geo_order Numerical order the midpoint appears within the tour, lowest numbers first. Unless managing geo points via API you should not need this value as midpoints are returned in order.
google_place_refreshed Datetime in "Y-m-d H:i:s" format of the time it has been refreshed.

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
errors Optional field. Only if there are errors.
Array of childs error. With the field is not valid and a description of the error.

More information