powering tour and activity businesses worldwide

XML API – Request – Search Inventory

in Tags: Developers

Description

The search_items query returns information about tours that match the search parameters. The tours returned are from the company represented by the submitted transcode/CID. This query has multiple additional arguments that help refine the search of found tours. All these optional arguments are independent of each other.

Required Arguments

Parameter Value
transcode CID
key REZGO API KEY
i search

Optional arguments

Parameter Value
t search target (smart com name uid tag) – the search target "smart" will search the entire record (be careful as this search may result in longer search times)
q query (the search string may contain * wildcards)
d date {Y-m-d format} – search for tours that are available on this date – can be a comma separated start date and end date.

 

Field Definitions

Item Node

Field Name Value
total total number of found tours
item an item node of matched tours
num position of the item node in the item array
uid unique numerical item ID
com common ID that groups tour options together
item tour name
option option name
code custom tour code
updated unix time stamp (last updated)
tags comma separated list of tags
starting submitted starting price for tour
group require group/passenger information {request; require; hide} – request: optional; require: required; hide: do not show
per minimum number of people required for booking to be allowed
cutoff minimum number of days in advance that booking must be made
duration text description of duration of the tour
date_selection how dates are selected, always, single_date, date_range
date node of prices for the day in the value attribute(in Y-m-d format) – refer to date node definition; only returned if there is availability for the given date
adult_label label for adult price option; only returned if date is specified
child_label label for child price option; only returned if date is specified
senior_labe label for senior price option; only returned if date is specified
price4_label – price9_label label for (price4 – price9) price option; only returned if date is specified
adult_required flag to indicate if adult price option is required (0 or 1); only returned if date is specified
child_required flag to indicate if child price option is required (0 or 1); only returned if date is specified
senior_required flag to indicate if senior price option is required (0 or 1); only returned if date is specified
price4_required – price9_required flag to indicate if (price4 – price9) price option is required (0 or 1); only returned if date is specified
currency_symbol currency symbol used by company (eg. $ £ € ¥)
currency_separator symbol used as decimal point/indicator
currency_decimals number of trailing decimal places to display
currency_base the base currency that the company uses – this is for use in portals
location name name of the location
location address address of the location
city location of tour – city
state location of tour – state
country location of tour – country
lat geotag latitude
lon geotag longitude
zoom geotag map zoom level
start_date UNIX timestamp of tour start date
end_date UNIX timestamp of tour end date
line_items node of line items associated with this option
total_adult the total cost sum of adult price option; only returned if date is specified
total_child the total cost sum of child price option; only returned if date is specified
total_senior the total cost sum of senior price option; only returned if date is specified
total_price4 – total_price9 the total cost of (price4 – price9) price option; only returned if date is specified
sub_total calculated sub-total
taxes calculated tax value (returned with a value when passenger info has been passed)
tax_calc calculated tax value (returned with a value when passenger info has been passed)
overall_total the total cost of the booking (only returned when passenger info has been passed); only returned if date is specified
deposit deposit amount required upon booking discrete value or percentage or amount required to be paid as deposit upon booking; only returned if date is specified
deposit_value currently not used
total_availability total number of available spots for this tour on that day; only returned if date is specified
group_forms node of forms given during booking – refer to group forms node definition; only returned if date is specified
primary_forms node of forms given during booking – refer to primary forms node definition; only returned if date is specified
details node of detailed info – refer to details node definition
seo node of so info – refer to so node definition
media node of images – refer to media node definition; number of results found included in the value attribute
cid unique numerical ID to identify the company that supplies this item
v version of the API being used
gt time to generate the result (used for SLA purposes)

Date Node

Field Name Value
active indicates whether the date is active or not (1 or 0)
availability total number of available spots for this tour on that day
price_adult cost for adult price option
price_child cost for child price option
price_senior cost for senior price option
price4 – price9 cost for (price4 – price9) price option

Group Forms Node

Field Name Value
id unique numerical form ID
type forms type of input
title title of the form
instructions the instructions associated with the field
require flag to indicate if form is required to be filled (0 or 1)
options for type select, these are the options available with this field
price price of the option (either added or subtracted for enabling this option) – only enabled for checkbox forms

Primary Forms Node

Field Name Value
id unique numerical form ID
type forms type of input
title title of the form
instructions the instructions associated with the field
require flag to indicate if form is required to be filled (0 or 1)
options for type select, these are the options available with this field
price price of the option (either added or subtracted for enabling this option) – only enabled for checkbox forms

Details Node

field name value
overview text – tour overview (HTML-formatted)
itinerary text – itinerary (HTML-formatted)
pick_up text – pick-up and departure info
drop_off text – drop-off and return info
bring text – things to bring info
inclusions text – inclusion info
exclusions text – exclusion info
cancellation text – cancellation info
description_name text – name of the customizable additional info field
description text – description of item (HTML-formatted)

Media Node

Field Name Value
path absolute path of the image
caption the text caption associated with the image

Example requests

Example 1: The request is for tours with the tag "nature".

http://api.rezgo.com/xml?transcode=1446&key=0U1-V4W9-L2S5-E4S&i=search&t=tag&q=nature

Example 2: The request is for tours where the word "nature" appears in the tour contents.

http://api.rezgo.com/xml?transcode=1446&key=0U1-V4W9-L2S5-E4S&i=search&t=smart&q=nature

Example 3: The request is for tours tagged as "nature" that are available on a specific date (in this case August 1, 2015).

http://api.rezgo.com/xml?transcode=1446&key=0U1-V4W9-L2S5-E4S&i=search&d=2015-08-01

Example 4: The request is for a specific tour (identified by the tour sku 29438) with availability on a specific date (in this case August 1, 2015).

http://api.rezgo.com/xml?transcode=1446&key=0U1-V4W9-L2S5-E4S&i=search&t=com&q=29438&d=2015-08-01

Example 5: The request is for a specific tour (identified by the tour sku 13074) with availability between specific dates (in this case August 1, 2015 and August 3, 2015).

http://api.rezgo.com/xml?transcode=1446&key=0U1-V4W9-L2S5-E4S&i=search&t=com&q=29438&d=2015-08-01,2015-08-03

We would love your feedback