Shared Listings

The Shared Listings service allows a permalink to be created to one or more listing IDs. The permalink then may be used to share the listings to various social networking sites or via e-mail or other means. This service simply creates the permalink. It’s up to the API client to allow the link to be shared.

  1. Applicable API Key Roles
  2. Authentication
  3. Available Services
    1. Shared Listings

Applicable API Key Roles

This service is available to API keys with private roles and IDX roles with both IDX and portal permissions. More information about roles may be found here.

Authentication

Requests must be authenticated according to these instructions or HTTP 401 (Unauthorized) will be returned.

Available Services

Shared Listings

URI: /<API Version>/sharedlistings/

HTTP Method Description
GET Returns information about a particular shared listing.
PUT, DELETE Returns HTTP 405 (Method Not Allowed). Not implemented.
POST Creates a new shared listings URI. To do this, POST to //sharedlistings with Content-Type: application/json . The POST body must use the Shared Listings Request Format below.

GET Request

URI: /<API Version>/sharedlistings/XX

XX is the shared listing ID (e.g. 15Ar) as returned from the POST method.

GET Response

Note that Mode is either Public or Idx . This indicates the mode in which the listing was shared, and may be used to inform which API key role to use when searching listings by the SharedListings parameter.

{
    "D": {
        "Success": true,
        "Results": [
            {
                "Id": "15Ar",
                "ResourceUri":  "/v1/sharedlistings/15Ar",
                "SharedUri":  "http://www.flexmls.com/share/15Ar/3544-N-Olsen-Avenue-Filabee-AZ-85719",
                "ListingIds": ["20110224152431857619000000","20110125122333785431000000"],
                "Mode": "Public"
            }
        ]
    }
}

POST Request

The POST body must use the following Shared Listings Request Format, with a minimum of one listing ID under the ListingIds attribute. ViewId is optional and is explained further below.

{
    "D": {
        "ListingIds": ["20110224152431857619000000","20110125122333785431000000"],
        "ViewId": "20080125122333787615000000"
    }
}
Attribute Description
ListingIds An array of listing IDs as returned by the Listings service. At least one value is required.
ViewId Optional. The ID of the view to use on search results if the shared link is viewed in a desktop browser. All shared listings will only show public information (private information never is shown).
Mode Optional. Indicates the mode in which the current listing(s) were shared. Acceptable values include Idx and Public. Defaults to Idx if not specified.

POST Response

This matches the GET response.

{
    "D": {
        "Success": true,
        "Results": [
            {
                "Id": "15Ar",
                "ResourceUri":  "/v1/sharedlistings/15Ar",
                "SharedUri":  "http://www.flexmls.com/share/15Ar/3544-N-Olsen-Avenue-Tucson-AZ-85719",
                "ListingIds": ["20110224152431857619000000","20110125122333785431000000"],
                "Mode": "Public"
            }
        ]
    }
}

Comments on this entry are closed.