Search Templates: Sorts

Sorts provide a template for listing search results, defining which fields the results should be sorted by.

  1. Supported Roles
  2. Available Services
    1. All Sorts
    2. Individual Sort
  3. Sorts Description
  4. Expansions
  5. API Explorer

Supported Roles

Role Reads Writes Notes
IDX Yes No
Public Yes No
VOW Yes No
Portal Yes No
Private Yes Yes
More information about roles may be found here.

Available Services

All Sorts

URI: /<API Version>/searchtemplates/sorts

All sorts belonging to or inheritable by the current user.

HTTP Method Description Conditional Notes
GET Returns all sorts the user has access to, ordered by name. No
POST Returns HTTP 405 (Method Not Allowed) No Not implemented
PUT Returns HTTP 405 (Method Not Allowed) No Not implemented
DELETE Returns HTTP 405 (Method Not Allowed) No Not implemented

GET Request

Parameters:
  • None

GET Response

{
    "D": {
        "Results": [
            {
                "ResourceUri": "/v1/searchtemplates/sorts/20120717212004874996000000",
                "Id": "20130717212004874996000000",
                "Name": "My Custom Listing Sort",
                "OwnerId": "20000426173054342350000000",
                "MlsId": "20000426143505724628000000",
                "Inheritable": true,
                "Inherited": false,
                "Hidden": false,
                "Fields": [
                    {
                        "Domain": "StandardFields",
                        "GroupField": null,
                        "Field": "ListPrice",
                        "SortType": "Ascending"
                    },
                    {
                        "Domain": "StandardFields",
                        "GroupField": null,
                        "Field": "MlsStatus",
                        "SortType": "Descending"
                    }
                ],
                "ModificationTimestamp": "2013-07-09T15:31:47Z"
            }
        ],
        "Success": true
    }
}

Individual View

URI: /<API Version>/searchtemplates/sorts/<Id>

HTTP Method Description Conditional Notes
GET Returns a specified sort. No
POST Returns HTTP 405 (Method Not Allowed) No Not implemented
PUT Returns HTTP 405 (Method Not Allowed) No Not implemented
DELETE Returns HTTP 405 (Method Not Allowed) No Not implemented

GET Request

Parameters:
Parameter Required Notes
Standard expansion parameters No

GET Response

See the GET request section for for the sorts service.

Sorts Description

Attribute Data Type Description
ResourceId Character The resource URI to a particular sort.
Id Character The unique id for the sort.
Name Character The user specified name for the sort.
OwnerId Character The account Id for the user that created the template.
MlsId Character The account Id for the MLS the owner belongs to.
Hidden Boolean If true, the sort is hidden from the results of the All Sorts service, and cannot be modified via Spark. These sorts can still be accessed directly.
Inheritable Boolean If true, the sort can be inherited by users under the current user's control.
Inherited Boolean If true, the sort was inherited from another user.
Fields Expansion A list of standard or custom fields used by the listing sort.
Domain Character The type of listing field. Either StandardFields or CustomFields.
GroupField Character The CustomField group the Field resides under. null if Domain is StandardFields.
Field Character The standard or custom field.
SortType Character The direction of the sort. Either Ascending or Descending.

Expansions

Expansion Roles Single Record Only? Selection Support? Description
Fields All Yes No A list of fields associated with the sort.

API Explorer

Interact with this service using the API Explorer.