API Question

Hello,

We are new to Wix.

We are looking to add in the below digital API for our website. It has coding within it such as JavaScript that needs to be inputted.

This is the API we have that needs to be added:

DETAILS FOR: Lettingweb Digital API

  1. Table of Contents:
    =================================
  2. AJAX API
  3. JSON/XML API
    a. SEARCHING
    b. VIEWING A PROPERTY
  4. USAGE NOTES
  5. EXAMPLE

=================================

  1. AJAX API
    =================================

First, is the ajax API which can be used directly on any site. It will load up a search form, return results, and display the properties.

This part of the API requires users to put in a javascript into the head of their page and a div, which becomes the output container for the content. The div requires an api key which we use to ensure that only those customers that have access to the API are using it.

To add the javascript you need to add the following to the head of your html page:

To create the div you need the following in your html page:

is replaced with your api key. That key is provided on request and is your agent ID. You will need to ensure that we are informed that you intent to use the API so we can enable it for you.

=================================
2. JSON/XML API

With the JSON and XML outputs you can use to build your own visuals. There are 2 end points for each output type, the search results and the listing. They can be reached at the following URLs:
JSON
Search Results: /digitalapi/jsonsearch
Listing: /digitalapi/jsonlisting

XML
Search Results: /digitalapi/xmlsearch
Listing: /digitalapi/xmllisting

All API calls will require your API key which is our ID for your agency. Each API key needs to be enabled on our end so please let us know when you’d like to use it.

=================================
2a. SEARCHING

The search results end point takes the following parameters:
Location: This is the location part of the search such as post code, city name, or part of the address.
Furnished: Indicates the furnished state of the property. The valid values are “Any”, “Not”, “Partly”, “Fully”. Default is “Any”
PropertyType: Indicates the type of property. Valid values are “Any”, “Flat”, “House”, “Serviced”, “Room”. Default is “Any”
MinBeds: Minimum number of bedrooms to search for. The values are 1 through 8 and “+” if more then 8 is selected.
MaxBeds: Maximum number of bedrooms to search for. The values are 1 through 8 and “+” if more then 8 is selected.
MinRent: The minimum rent to search for. The values are from 200 to 2000 incremented by 200 although any valid number is allowed. “+” indicates values over 2000.
MaxRent: The maximum rent to search for. The values are from 200 to 2000 incremented by 200 although any valid number is allowed. “+” indicates values over 2000.
Sort: Indicates the sort order to return. The allowed values are “beds” for sorting by number of bedrooms and “rent” for sorting by the rent price. A “-” in front of the term will sort in descending order. The default sort is by property live date from newest to oldest.
Showing: This indicates the number of properties that are already displayed. The API currently retuns properties in batches of 10.

The results will contain the following information:
Found: The count of properties that were found.
Returned: The count of properties that were returned.
Results: A collection of property information. These results contain the following fields.
ListingId: The listing identifier used to view the property on our site and used to fetch the listing from the listing end point.
DisplayAddress: The address that is displayed for the listing.
PostcodePartOne: The first part of the postcode.
ImageUrl: The URL to the main image for the property. If no image is available this will lead to a “No Image” image.
Status: Either “Available” or “Let Agreed” (No other properties are ever returned.)
Rent: The rent for the property formatted to include the # sign. This is ready for display.
RentFrequency: Either “PW” (Per Week) or “PCM” (Per Calendar Month)
Beds: Count of the bedrooms in the property.
Summary: The summary limited to 200 characters.

=================================
2b. VIEWING A PROPRETY

The listing end point requires the listing id which can be found in the search results.

It will return the following information:
ListingId: The listing identifier used to view the property on our site and was used to fetch this listing.
DisplayAddress: The address that is displayed for the listing.
PostcodePartOne: The first part of the postcode.
Deposit: The deposit for the property formatted to include the # sign. This is ready for display.
Rent: The rent for the property formatted to include the # sign. This is ready for display.
RentFrequency: Either “PW” (Per Week) or “PCM” (Per Calendar Month)
Summary: The summary for the property limited to 200 characters.
Description: The full description of the property.
Furnished: The text representation of the furnished state of the property. The values are: Any, Furnished, Part furnished, Unfurnished
Bedrooms: The count of bedrooms
LandlordNumber: The landlord number
Status: Either “Available” or “Let Agreed” (properties that are not in one of these states will not be returned.
Features: The list of features. All string results.
ImageUrls: The list of image urls. Will be empty if property does not have any images.

=================================
3. USAGE NOTES

Please be aware that the API is currently in BETA and is subject to change without notice. We will strive to ensure compatibility but if it is not possible things my change.

If a field is missing that you would like to see, please let us know and we’ll try to add it. Since the API is publically available we need to ensure that all information is secure and therefore we cannot expose any information that is not appropriate for public consumption.

=================================
4. Example

In order to get a list of properties you need to use the following query:

www.lettingweb.com/digitalapi/jsonsearch?apikey=348

The link return all live properties from the agent in a JSON format.

Let say you want to get all properties with 2 bedrooms, then the link will be as follow:

www.lettingweb.com/digitalapi/jsonsearch?apikey=348&minbeds=2&maxbeds=2

Let say now a user want a minimum of 2 bedrooms without a max number of bedrooms, then the link will be as follow:

www.lettingweb.com/digitalapi/jsonsearch?apikey=348&beds=2

or

www.lettingweb.com/digitalapi/jsonsearch?apikey=348&minbeds=2

Let say you want to get all properties with £350 rent, then the link will be as follow:

www.lettingweb.com/digitalapi/jsonsearch?apikey=348&minrent=350&maxrent=350

Let say now a user want a minimum of £350 rent without a max rent, then the link will be as follow:

www.lettingweb.com/digitalapi/jsonsearch?apikey=348&rent=350

or

www.lettingweb.com/digitalapi/jsonsearch?apikey=348&minrent=350


Can this be done and if yes, how?

Thanks,

GPL