home > support > API > Marketplace API > API: create_pickup
Creates a new pickup point.
For Tour Operator usage only (not accessible by Marketplace Agents).
Endpoint | /c/pickups/new |
Formats | XML |
Example | /c/pickups/new |
Verb | POST |
PHP examples use the PHP Client Library with the return type set to SimpleXML
object create_pickup(SimpleXmlElement $pickup_data, int $channel)
// Create the simplexml object to contain the pickup data.
$pickup_data = new SimpleXMLElement('<pickup/>');
$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, creating the new pickup point.
$result = $tourcms->create_pickup($pickup_data, $channel);
if ($result->error == "OK") {
print "NEW PICKUP ID: " . $result->pickup->pickup_id;
} else {
print $result->error;
}
NEW PICKUP ID: 1
Looking for sample code in a different language? TourCMS and community provided API libraries
Enter your TourCMS API credentials below to call the Create Pickup Point endpoint.
Take care, submitting this form will modify live data!
There are no querystring parameters.
The following fields can be posted as XML when calling the API method. The pickup_name 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 |
|