If you are using the XML integration, the styling of your site is totally up to your developer. SafariNow offer a number of XML data feeds:
XML Integration introduction
Request and Response
The XML API uses a simple XML-HTTP implementation, with requests submitted to the following URL: http://www.safarinow.com/lib/hbef/xmlapi/search.aspx with any respective filters/arguments.
The response is formatted as Version 1.0 compliant XML.
If you prefer JSON, add a JSON=1 querystring parameter to your URL
N.B. You should NOT use this data in real-time. You should instead retrieve, and store the feed data on a scheduled basis.
Authentication
All queries requires authentication. You may only request a feed during an authenticated session. This means that you need to be logged into your SafariNow affiliate account when you issue the request. Alternatively you may pass your encrypted user Id, as a querystring argument, which will authenticate you.
Arguments
Query arguments are passed in the querystring as name / value pairs, separated by an & (ampersand).
e.g http://www.safarinow.com/lib/hbef/xmlapi/search.aspx?query=locations&lid=1583
Establishments feed
This feed allows you to retrieve XML data including all live Establishments on SafariNow.
Using query string parameters, you may specify a set of filters which allow you to restrict the results you receive.
Typically you would specify a location, using the location Id. To find location id's, you may use the Locations feed.
You can also specify features e.g. 'self catering', using a feature Id. To find feature id's, you may use the Features feed.
Arguments:
The following table identifies the various querystring arguments that may be passed to this query to filter the results.
Key | Possible value(s) | Description |
i *Required | C67uKel | Your encrypted user Id |
query *Required | establishments | The type of feed you are retreiving |
lid | Any location ID from the Locations feed | Select establishments from a specific location |
fid | Numeric values, optionally seperated by a pipe character. Example: 421|321|221 | Select establishments based on feature ID's from the Features feed. |
top | Numeric value (Default 40) | Only get the top X establishments for your query. |
description | true | Add the full description to the feed. This is false by default |
full | true | Adds best price promise, features, promotions and reviews in the XML. This is false by default |
Example 1 - Reduced
Returns all bed and breakfast and guesthouse (&fid=321|342) accommodation in Hout Bay (&lid=1003), Cape Town
Example 2 - Full
Returns all bed and breakfast and guesthouse (&fid=321|342) accommodation in Hout Bay (&lid=1003), Cape Town and includes best price promise, reviews, promotions, features (&full=true).
Retrieve subset
If you want to retrieve a subset of the results, you can add below parameters to the request. Note: This only works on the Establishments feed.
Key | Possible value(s) | Description |
If you pass the "page" parameter, you must also pass "records" | ||
page *Required | Numeric value >= 1 | The page to start the results from Important: This value must be greater than or equal to 1 |
records *Required | Numeric value | The number of records you wish to retrieve |
lastupdated | Date e.g. &lastupdated=19 May 2012 | The date of your last feed retrieval. Only products updated after this date will be returned. |
Single establishment feed
This feed will allow you to retrieve the XML representing a single establishment.
Arguments:
Key | Possible value(s) | Description |
i *Required | C67uKel | Your encrypted user Id |
query *Required | establishment | The type of feed you are retreiving |
spid *Required | Numeric value | The numeric ID of the establishment |
includedescription | true | Add the full description to the feed. This is false by default |
full | true | Adds best price promise, features, promotions and reviews in the XML. This is false by default |
Example 1 - Reduced
Returns the XML for product with Id = 341610
http://www.safarinow.com/lib/hbef/xmlapi/search.aspx?query=establishment&i=C67uKel&spid=341610
Example 2 - Full
Below URL returns the full XML for product with Id = 341610
Real-time Availability
You may also get availability information back when using either the Establishments, or the Single Establishment feed. The following table indicates all the required arguments to do this.
If an establishment is available for the requested dates, and guests the product will contain an 'available' child element with a value of 'true'.
Not all establishments supply live availability data. So a value of 'false', does not mean that the establishment is not available. It means that it is not available to book 'real-time'. You may still request a quote.
If you do not supply availability parameters, then all establishments will have this value set to false. Again, this does not imply that these establishments are not available.
Arguments:
Key | Possible value(s) | Description |
guests *Required | Numeric value | Used in availability queries to set the number of guests. |
nights *Required | Numeric value | Used in availability queries to set the number of nights. |
arrive *Required | YYYY/MM/DD | Used in availability queries to define the arrival date. Example: 2018/05/14 |
Example 1 - Reduced
Below URL will return all bed and breakfast and guesthouse (&fid=321|342) accommodation in Hout Bay (&lid=1003), Cape Town within the selected availability.
Example 2 - Full
Below URL will return the full XML feed of all bed and breakfast and guesthouse (&fid=321|342) accommodation in Hout Bay (&lid=1003), Cape Town within the selected availability.
Locations feed where SafariNow.com has accommodation
All Locations
This feed allows you to retrieve XML data including all locations used to classify establishments on SafariNow.
Arguments:
The following table identifies the various querystring arguments that may be passed to this query.
Key | Possible value(s) | Description |
i *Required | C67uKel | Your encrypted user Id |
query *Required | locations | The type of feed you are retreiving |
Single Location
This feed will allow you to retrieve the XML representing a single location.
Arguments
Key | Possible value(s) | Description |
i *Required | C67uKel | Your encrypted user Id |
query *Required | location | The type of feed you are retreiving |
lid *Required | Numeric value | The required location Id |
Features feed of Establishments
All Features
This feed allows you to retrieve XML data including all features used to classify establishments on SafariNow.
Using query string parameters, you may specify a set of filters which allow you to restrict the results you receive.
Arguments:
The following table identifies the various querystring arguments that may be passed to this query to filter the results.
Key | Possible value(s) | Description |
i *Required | C67uKel | Your encrypted user Id |
query *Required | features | The type of query. For this method: features |
Single Feature
This feed will allow you to retrieve the XML representing a single feature.
Arguments:
Key | Possible value(s) | Description |
i *Required | C67uKel | Your encrypted user Id |
query *Required | feature | The type of query. For this method: feature |
fid *Required | Numeric value | The feature Id |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article