Guide for migrating QueryProducts to atlas search
Sample ATLAS equivalent QueryProducts call
All accommodation in ACT which has been updated since 1 January 2017,
https://[host]/api/atlas/products?key=[key]&cats=ACCOMM&delta=2017-01-01&st=act&out=xml
A standard type of query products call to ATLAS will look like this
ATWS | ATLAS |
---|---|
<row><param>STATE</param><value>Australian Capital Territory</value></row> | &st=act (To get a list of all states click here.) |
<row><param>PRODUCT_CATEGORY_LIST</param><value>ACCOMM</value></row> | &cats=ACCOMM (To get a list of all categories click here) |
<row><param>DELTA_DATE</param><value>2015-06-01</value></row> | &delta=2017-01-01 (For more information on the delta date please click here) |
<row><param>DOMESTIC</param><value>Australian Capital Territory Region</value></row> | &rg=Australian Capital Territory Region (To get a list of all regions click here) |
<row><param>PRODUCT_ATTRIBUTE</param><value>[TOURISMORG][and][RTOTTNQ]</value></row> | &att=TOURISMORGRTOTTNQ (For more information on attributes click here) |
<row><param>PRODUCT_CLASSIFICATION</param><value>APARTMENT</value></row></row> | &cla=APARTMENT (For more information on product classifications please click here) |
<api_query_id>448A9AEE-5050-4F65-9493-3421AB1C1D46</api_query_id> | Not applicable. |
<total_records_found>0</total_records_found> | <number_of_results>0</number_of_results> |
ATWS | ATLAS |
---|---|
QueryProductsNextPage <parameters> <row><param>API_QUERY_ID</param><value>xxxyyyzzz</value></row> <row><param>PAGE_NUMBER</param><value>10</value></row> <row><param>RESULTS_PER_PAGE</param><value>100</value></row> </parameters> |
For ATLAS, no api query id is required. &pge=10&size=100 For more information please click here. |
ATWS | ATLAS |
---|---|
<delete_indicator>0</delete_indicator> |
<status>ACTIVE</status> Note: this field is returned by default only when a &delta parameter is passed. For more information on the 3 status available, please refer to the delta page. |
ATLAS is a webservice that has geospatial capabilities. Due to this, the returned results from ATLAS will differ from ATWS with ATLAS being more accurate.
For example, when searching for TOURS in Brisbane, ATWS will look for tours where the head office is located in Brisbane. This could potentially imply that TOURS
that do not have a head office in Brisbane will not be returned when Brisbane parameter is passed in.
ATLAS on the other hand will ignore the head office location and instead search through each of the TOUR services and if a TOUR passes into Brisbane,
it will be included in the search results.
ATWS | ATLAS |
---|---|
QueryProducts <parameters> <row><param>PRODUCT_CATEGORY_LIST</param><value>ALL</value></row> <row><param>STATE</param><value>QUEENSLAND</value></row> <row><param>RESULTS_PER_PAGE</param><value>100</value></row> <row><param>SUBURB_OR_CITY</param><value>Brisbane City</value></row> </parameters> |
https://[host]/api/atlas/products?key=[key]&st=QLD&ct=brisbane%20city |
Due to the real time features of ATLAS, some information that would have made sense to be returned in a batch focused webservice like ATWS is no longer returned initially in a queryProducts (search) call.
ATWS | ATLAS |
---|---|
QueryProducts <parameters> <row><param>STATE</param><value>QUEENSLAND</value></row> <row><param>RESULTS_PER_PAGE</param><value>100</value></row> <row><param>SUBURB_OR_CITY</param><value>Brisbane City</value></row> <row><param>PRODUCT_NAME</param><value>Adina Apartment Hotel Brisbane</value></row> <row><param>PRODUCT_CATEGORY_LIST</param><value>ACCOMM</value></row> <row><param>MULTIMEDIA_RETURN</param><value>YES</value></row> </parameters> Results Snippet. <product_multimedia> <row> <market_variant_name>English / Global</market_variant_name> <multimedia_id>9370204</multimedia_id> <server_path>http://national.atdw.com.au/multimedia/tq/ATDW_Landscape__AC92_MEBNBalcony.jpg</server_path> <attribute_id_multimedia_file>.JPG</attribute_id_multimedia_file> <attribute_id_multimedia_content>IMAGE</attribute_id_multimedia_content> <attribute_id_size_orientation>LANDSCAPE</attribute_id_size_orientation> <width>280</width> <height>228</height> <alt_text>Medina Executive Brisbane</alt_text> </row> |
https://[host]/api/atlas/products?key=[key]&st=QLD&ct=brisbane%20city&fl=product_id,product_name,product_image&term=Adina%20Apartment%20Hotel%20Brisbane
Results <products> <product_record> <product_id>56b25d302880253d74c4479a</product_id> <product_name>Adina Apartment Hotel Brisbane</product_name> <product_image> https://assets.atdw-online.com.au/images/b3b36f9d685443945320484796bb748f.jpeg?rect=0,0,2500,1875&w=280&h=210 </product_image> </product_record> |
To obtain the additional information, a getProduct (search) will be required.
ATLAS |
---|
https://[host]/api/atlas/product?key=[key]&productid=56b25d302880253d74c4479a Results Snippet: <product_multimedia> <row> <market_variant_id>English / Global</market_variant_id> <multimedia_id>588ef41b176f891a2887be5e</multimedia_id> <authored_date>2017-01-30</authored_date> <server_path> https://assets.atdw-online.com.au/images/b3b36f9d685443945320484796bb748f.jpeg?rect=0,0,2500,1875&w=2048&h=1536 </server_path> <attribute_id_multimedia_content>IMAGE</attribute_id_multimedia_content> <attribute_id_size_orientation>4x3</attribute_id_size_orientation> <width>2048</width> <height>1536</height> <alt_text>Exterior</alt_text> <caption>Exterior<caption> <Photographer /> <sequence_number>100</sequence_number> </row> |
Results can be requested in JSON or XML format.