home > support > API > Marketplace API > API: update_tour_geopoint
Updates a tour geopoint.
For Tour Operator usage only (not accessible by Marketplace Agents).
Endpoint | /api/tours/geos/update |
Formats | XML |
Example | /api/tours/geos/update |
Verb | POST |
PHP examples use the PHP Client Library with the return type set to SimpleXML
object update_tour_geopoint(SimpleXmlElement $geopoint, int $channel)
// Create a new SimpleXMLElement with 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, updating the tour geopoint.
$result = $tourcms->update_tour_geopoint($geopoint, $channel);
if ($result->error == "OK") {
print "Tour Geopoint updated";
} else {
print $result->error;
}
Tour Geopoint updated
Looking for sample code in a different language? TourCMS and community provided API libraries
There are no querystring parameters.
The following fields can be posted as XML when calling the API method. The tour_id is the only required field.
XML NODE | Notes | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
geocode |
Tour geopoint node contains:
|
XML Node | Notes |
---|---|
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. |