Syndication

This page outlines the steps for utilizing Foyer's syndication service

The Foyer syndication system allows you to receive changes to followed listings. The api endpoints are outlined in detail below. You can elect to receive realtime notifications, as outlined below, or use our refreshAllListings endpoint to check for updates as desired.

Push Notifications

In order to receive realtime notifications of changes to listings available to your account, we require a URL of the form api.mycompany.com/foyerNotify that accepts a query parameter of listing=https://api.foyer.ai/odata/Property('ListingKey').The URL provided to your system in the query parameter can then be used to make a network request back to our server for the listing data in standard RESO format.

Make sure to include your valid authorization token in the request header when querying our Property endpoint. See Authorization in the sidebar for more details

You can provide your notification URL during sign-up as the notify body parameter or at a later time using the updateNotify endpoint outlined below.

Publisher Sign Up

POST https://api.foyer.ai/User/publisherSignUp

This method is used for a publisher to sign up to receive syndication notifications. This method returns an authorization token in the response header. Additional tokens can be generated by using the login method, see Authorization in the sidebar for more details.

Request Body

NameTypeDescription

email

string

The email to be associated with the account

password

string

The password used for authorization

confirmPassword

string

The password again for confirmation

notify

string

The url for receiving notifications about changes to available listings

website

string

A website for the organization associated with the account

logo

string

An image url for the organization associated with the account

Be sure to save the authorization token in the response header and include it when making API requests.

Publisher Update Notification URL

POST https://api.foyer.ai/Publisher/updateNotify

This method is used to update the push notification URL for your account. A valid authorization token is needed to make sure the correct account is updated.

Headers

NameTypeDescription

Authorization

string

Authorization token

Request Body

NameTypeDescription

notify

string

The url for receiving notifications about changes to available listings

Get a listing in RESO format

GET https://api.foyer.ai/odata/Property('ListingKey')

This endpoint allows you to receive all listing details in standard RESO format

Path Parameters

NameTypeDescription

reportId

string

id for the desired listing

Headers

NameTypeDescription

Authorization

string

Authorization token

{
  "ListingKey": "3yd-A2SELL-281884",
  "ListingId": "281884",
  "PropertyType": "Land",
  "PropertySubType": "Other",
  "ListPrice": 21900,
  ...
  "Media": [
    {
      "MediaCategory": "Photo",
      "MediaURL": "http://photos.listhub.net/A2SELL/281884/1", // required
      "MediaKey": "2483763c0011d2a36483fb3f28ca8c00564abb4d",
      "MediaModificationTimestamp": "2019-10-03T09:14:00.000Z"
    },
    ...
  ]
}

See the Data Dictionary for more information on RESO format

Refresh all listings

GET https://api.foyer.ai/Publisher/refreshAllProperties

This method is used for receiving an array of exportReso urls that can be used to update all listings available for one's own account.

Headers

NameTypeDescription

Authorization

string

Authorization token

[
    "https://api.foyer.ai/reports/1/exportReso"
    "https://api.foyer.ai/reports/2/exportReso"
]

Last updated