RETS Listing Activity API

Introduction

This document is aimed at users of the flexmls RETS data feed who will be providing information to flexmls. The information we are targeting in this document is view data, either posted to our server in bulk format or tracked via a tracking image. If you do not currently gather daily statistics of the activity for listings, then the tracking URL would be the path to follow. If you do have the statistics available per listing per day, then it would be best to use the web end point to post your information to the flexmls server on a regular basis.

Generating your API Key

Visit http://retsgw.flexmls.com/rets2_0/API and log in using your RETS access credentials (Note: this URL is also advertised as the X-ApiAccessSettings capability through a standard RETS login session). Upon visiting that page, if you haven’t already generated an API key, you will be prompted to do so. If you have already gone through the generation, you will see your API key displayed.

Using the Tracking Image

The tracking image approach is a GET request . The response returned is a 1×1 pixel transparent gif and should be used when listing is brought up for a detailed view.

The URL format is structured as follows:

https://retsgw.flexmls.com/tracking/v1/listings/views/listing/{listingId}/{apiKey}/tracker.gif

where {listingId} is the listing identifier of the listing being displayed (System Name LIST_105/Standard Name ListingID) and {apiKey} is the key you generated via the previous section.

Http return status codes could be:

  • 200 – Everything is OK
  • 403 – Your API key didn’t pass authorization
  • 500 – An internal server error occurred.

Uploading Cumulative View Data

The other option is to post XML data about the cumulative statistics you have to our web end point. The data must adhere to the ViewTracking schema. This approach assumes you have cumulative per day data available to upload. The URL for this web end point is https://retsgw.flexmls.com/tracking/v1/listings/views/{apiKey}/ and accepts only the POST method.

The core concept of the schema is each View is considered a grouping of listings presented by a given provider for a given day.

Scenario 1 – Listing Aggregator

If you aggregate listings and distribute those to multiple recipients, you could provide information per recipient.

For example, envision you distribute listings to Company A, Company B and Company C. The xml you post would look something like the following:

<?xml version=”1.0″ encoding=”UTF-8″?>
<Views xmlns=”https://retsgw.flexmls.com/tracking/v1″
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”https://retsgw.flexmls.com/tracking/v1/ ViewTracking.xsd”>
<View>
<ViewDate>2010-01-01</ViewDate>
<ViewSupplierName>Company A</ViewSupplierName>
<Listing>
<ListingKey>09-75</ListingKey>
<ListingViewCount>10</ListingViewCount>
<ListingUrl>http://www.companya.com/listing/09-75/</ListingUrl>
</Listing>
<Listing>
<ListingKey>09-76</ListingKey>
<ListingViewCount>12</ListingViewCount>
<ListingUrl>http://www.companya.com/listing/09-76/</ListingUrl>
</Listing>
</View>
<View>
<ViewDate>2010-01-01</ViewDate>
<ViewSupplierName>Company B</ViewSupplierName>
<Listing>
<ListingKey>09-75</ListingKey>
<ListingViewCount>20</ListingViewCount>
<ListingUrl>http://www.companyb.com/listing/09-75/</ListingUrl>
</Listing>
<Listing>
<ListingKey>09-76</ListingKey>
<ListingViewCount>22</ListingViewCount>
<ListingUrl>http://www.companyb.com/listing/09-76/</ListingUrl>
</Listing>
</View>
<View>
<ViewDate>2010-01-01</ViewDate>
<ViewSupplierName>Company C</ViewSupplierName>
<Listing>
<ListingKey>09-75</ListingKey>
<ListingViewCount>30</ListingViewCount>
<ListingUrl>http://www.companyc.com/listing/09-75/</ListingUrl>
</Listing>
<Listing>
<ListingKey>09-76</ListingKey>
<ListingViewCount>32</ListingViewCount>
<ListingUrl>http://www.companyc.com/listing/09-76/</ListingUrl>
</Listing>
</View>
</Views>

In the case you don’t have the data partitioned by recipient and lump all view data for all recipients together, you can leave the ViewSupplier element empty, which will default to Other.

<?xml version=”1.0″ encoding=”UTF-8″?>
<Views xmlns=”https://retsgw.flexmls.com/tracking/v1″
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”https://retsgw.flexmls.com/tracking/v1/ ViewTracking.xsd”>
<View>
 <ViewSupplierName/>
<ViewDate>2010-01-01</ViewDate>
<Listing>
<ListingKey>09-75</ListingKey>
<ListingViewCount>49</ListingViewCount>
</Listing>
</View>
</Views>

Scenario 2 – Website Provider with Daily View Statistics

If you are the web site provider and carry daily view statistics, you can post the XML with the ViewSupplier element empty or enter the name of your company,

<?xml version=”1.0″ encoding=”UTF-8″?>
<Views xmlns=”https://retsgw.flexmls.com/tracking/v1″
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”https://retsgw.flexmls.com/tracking/v1/ ViewTracking.xsd”>
<View>
<ViewDate>2010-01-01</ViewDate>
<ViewSupplierName/>
<Listing>
<ListingKey>09-75</ListingKey>
<ListingViewCount>10</ListingViewCount>
<ListingUrl>http://www.mywebcompany.com/listing/09-75/</ListingUrl>
</Listing>
<Listing>
<ListingKey>09-76</ListingKey>
<ListingViewCount>12</ListingViewCount>
<ListingUrl>http://www.mywebcompany.com/listing/09-76/</ListingUrl>
</Listing>
</View>
<View>
<ViewDate>2010-01-02</ViewDate>
<ViewSupplierName/>
<Listing>
<ListingKey>09-75</ListingKey>
<ListingViewCount>20</ListingViewCount>
<ListingUrl>http://www.mywebcompany.com/listing/09-75/</ListingUrl>
</Listing>
<Listing>
<ListingKey>09-76</ListingKey>
<ListingViewCount>22</ListingViewCount>
<ListingUrl>http://www.mywebcompany.com/listing/09-76/</ListingUrl>
</Listing>
</View>
<View>
<ViewDate>2010-01-03</ViewDate>
<ViewSupplierName/>
<Listing>
<ListingKey>09-75</ListingKey>
<ListingViewCount>30</ListingViewCount>
<ListingUrl>http://www.mywebcompany.com/listing/09-75/</ListingUrl>
</Listing>
<Listing>
<ListingKey>09-76</ListingKey>
<ListingViewCount>32</ListingViewCount>
<ListingUrl>http://www.mywebcompany.com/listing/09-76/</ListingUrl>
</Listing>
</View>
</Views>

Expected HTTP return codes from the posting of the XML could be:

  • 200 – everything processed correctly.
  • 403 – your API key didn’t pass authorization.
  • 500 – an internal server error occurred processing the upload.

General Expectations of using the XML Post option

We generally hope to see feedback from listing activity every 1 to 3 days. As seen within the schema, a View is unique by day/supplier so spanning multiple days shouldn’t be a problem, however, it may result in overly large XML files, depending on how many listings are being accounted for.

Due to the amount of processing that may occur during upload, it is preferred this data is posted after 10 PM CST.

Any issues you may run into or questions you have, please contact rets-support@fbsdata.com.

Comments on this entry are closed.