home > support > API > Marketplace API > managing dates & prices externally > search raw departures
Get a raw departure data list for a particular Tour
Part of a series of API calls intended largely for managing dates and prices outside of TourCMS
This is the raw departure information as entered by members of staff (with no currency conversion, markup etc added) intended for those looking to manage their dates and prices externally of TourCMS. This is not intended to be displayed to customers / agents.
For displaying dates & prices to customers / agents we suggest using Dates & DealsUsers should use the existing date band searches to work on e.g. a month or 2,3 at a time if they have many departures.
Endpoint | /c/tour/datesprices/dep/manage/search |
Formats | XML |
Example | /c/tour/datesprices/dep/manage/search.xml?id=1 |
Verb | GET |
PHP examples use the PHP Client Library with SimpleXML
object search_raw_departures ( int $tour, int $channel, [ string $params = "" ] )
// The Tour we want to retrieve departures for
$tour = 1;
// Channel the Tour belongs to
$channel = 3930;
// Query the TourCMS API
$result = $tourcms->search_raw_departures( $tour, $channel);
// Loop through each departure and output the ID, code and time
foreach($result->tour->dates_and_prices->departure as $departure) {
print $departure->departure_id.' '.$departure->code.' '.$departure->start_date.'<br />';
}
2765 09:00-12:30 2013-11-20
2766 13:00-16:30 2013-11-20
C# examples use the .Net Client Library
Coming soon
VB examples use the .Net Client Library
Coming soon
Parameter | Notes |
---|---|
id | ID of the Tour to retrieve raw departure information from |
start_date_start start_date_end | Optionally request just those departures starting between two dates. Format: YYYY-MM-DD |
per_page | Number of results to return per page. Default is 10000. Max is 10000. Minimum is 1. |
page | Integer for which page number to return. Default is page 1. Where page is used, per_page must be provided also. If not provided both error returned INVALID_PAGINATION |
The Channel ID is also passed in the header, if you are using one of our client libraries then you will be passing the Channel ID as the second argument.
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tour |
The tour node contains:
|