home > support > API > Marketplace API > API: update_pickup
Updates an existing pickup point based on pickup_id.
For Tour Operator usage only (not accessible by Marketplace Agents).
Endpoint | /c/pickups/update |
Formats | XML |
Example | /c/pickups/update |
Verb | POST |
PHP examples use the PHP Client Library with the return type set to SimpleXML
object update_pickup(SimpleXmlElement $pickup_data, int $channel)
// Create the simplexml object to contain the pickup data.
$pickup_data = new SimpleXMLElement('<pickup/>');
// The id of the pickup point to update.
$pickup_data->pickup_id = 1;
$pickup_data->pickup_name = "pickup_name";
$pickup_data->description = "description";
$pickup_data->address1 = "new address1";
$pickup_data->address2 = "new address2";
$pickup_data->postcode = "new postcode";
$pickup_data->lat = 123;
$pickup_data->long = 321;
$pickup_data->staff_only = 1;
$pickup_data->rank = 0;
$pickup_data->viator_name = "viator pickup name";
$pickup_data->supplier_pickup_code = "supplier pickup code";
// Define the channel ID this pickup point belongs to.
$channel = 3930;
// Call TourCMS API, updating an existing pickup point.
$result = $tourcms->update_pickup($pickup_data, $channel);
if ($result->error == "OK") {
print "UPDATED PICKUP ID: " . $result->pickup->pickup_id;
} else {
print $result->error;
}
UPDATED PICKUP ID: 1
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 pickup_id is the only required field.
XML NODE | Notes | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pickup_point |
Pickup point 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 | ||||
pickup |
|