Standard Fields

The Standard Fields API allows retrieval of a list of supported standard fields and list items, both for all fields and all list items for each field as well as fields nearby to a geographical location.

Authentication

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

Applicable API Key Roles

This service is available to API keys with private or IDX roles. Within the IDX role, both IDX and Portal permissions may access this service. More information about roles may be found here.

Available Services

Get standard fields

URI: /<API Version>/standardfields/

GET Request

Parameters:

  • None

GET Response

If a field is a date field, the response will include the MLS-defined default search ranges for date fields in relative terms. In the example below, the MLS has the default date range for pending date to be from 6 months ago to 10 years from now.

The field’s visibility as defined by the MLS is indicated in the MlsVisible attribute. The visible fields are noted in the property type list; the field is not visible in property types that are not shown.

{
    "D": {
        "Success": true,
        "Results": [
            {
                "City": {
                    "Searchable": true,
                    "Type": "Character",
                    "ResourceUri": "/v1/standardfields/City",
                    "HasList": true,
                    "MlsVisible": {
                        "PropertyTypes": ["A","B","C"]
                    }
                },
                "BedsTotal": {
                    "Searchable": true,
                    "Type": "Integer",
                    "ResourceUri": "/v1/standardfields/BedsTotal",
                    "MlsVisible": {
                        "PropertyTypes": ["A","B","C"]
                    }
                },
                "ListPrice": {
                    "Searchable": true,
                    "Type": "Decimal",
                    "ResourceUri": "/v1/standardfields/ListPrice",
                    "MlsVisible": {
                        "PropertyTypes": ["A","B","C"]
                    }
                },
                "PendingDate": {
                    "Searchable": true,
                    "Type": "Character",
                    "ResourceUri": "/v1/standardfields/PendingDate",
                    "HasList": true,
                    "Defaults": {
                        "FromQuantity": "6",
                        "FromUnit": "months",
                        "ToQuantity": "10",
                        "ToUnit": "years"
                    },
                    "MlsVisible": {
                        "PropertyTypes": []
                    }
                }
            }
        ]
    }
}

A list of available types are: Integer, Decimal, Character, Date, Boolean, Datetime . If the type of a field is Character, the HasList boolean attribute will be returned. If HasList=true, then sending a request to the URI specified by ResourceUri will also return a FieldList attribute with an array of objects containing the list. Note that the items in the FieldList array are ordered by Name.

Example response from /v1/standardfields/City . Note that for this sample field, the lists were the same across all property types. See the next example for a field with lists that are different across property types.

{
    "D": {
        "Success": true,
        "Results": [
            {
                "City": {
                    "Searchable": true,
                    "Type": "Character",
                    "ResourceUri": "/v1/standardfields/City",
                    "HasList": true,
                    "FieldList": [
                        {
                            "Value": "Fargo",
                            "Name": "Fargo"
                        },
                        {
                            "Value": "West Fargo",
                            "Name": "West Fargo"
                        },
                        {
                            "Value": "Moorhead",
                            "Name": "Moorhead"
                        }
                    ]
                }
            }
        ]
    }
}

Here is an example of a field where the list is different across property types. Note the AppliesTo attribute, which is an array of string codes with property type codes from the property types service indicating to which property types the item applies.

{
    "D": {
        "Success": true,
        "Results": [
            {
                "PropertySubType": {
                    "Searchable": true,
                    "Type": "Character",
                    "ResourceUri": "/v1/standardfields/PropertySubtype",
                    "HasList": true,
                    "FieldList": [
                        {
                            "Value": "SF",
                            "Name": "Single Family",
                            "AppliesTo": [
                                "A",
                                "B",
                                "C"
                            ]
                        },
                        {
                            "Value": "CD",
                            "Name": "Condo",
                            "AppliesTo": [
                                "A",
                                "B",
                                "C"
                            ]
                        },
                        {
                            "Value": "CO",
                            "Name": "Commercial",
                            "AppliesTo": [
                                "D"
                            ]
                        }
                    ]
                }
            }
        ]
    }
}

Get standard fields near by a specified latitude and longitude

URI: /<API Version>/standardfields/nearby/X

Note that X is one or more comma-separated property type codes (MlsCode) from the Property Types service. For example, X might be A,B,C,E to request nearby fields for four property types.

GET Request

Parameters:

  • Lat : latitude of the point to return nearby fields and list items (required)
  • Lon : longitude of the point to return nearby fields and list items (required)

The _expand parameter is also supported on this service as follows:

  • 0 : default. Returns an error since this isn’t currently implemented. When implemented, will return a list of fields (not list items) that support nearby services.
  • [list of comma-separated standard names] : Returns all that _expand=0 returns, plus nearby list items for specified standard fields.
  • 1 : Returns all that _expand=0 returns, plus nearby list items for all fields that have “nearby” support.

The response for the nearby service is in the same format as the normal Standard Fields response, with the exception that the only fields and list items that are returned are the ones that are nearby the latitude and longitude specified.

Comments on this entry are closed.