New Mexico MLS

Data Services

Log In

Web API Documentation

Overview

What is a REST API?

REST stand for Representational State Transfer. This is an architectural pattern describing how distributed systems can expose a consistent interface. When the term is used, it generally refers to an API accessed via HTTP protocol at a predefined set of URLs.

These URLs represent various resources - any information or content accessed at that location, which can be returned as JSON, HTML, audio files, or images. Often, resources have one or more methods that can be performed on them over HTTP, like GET, POST, PUT and DELETE.

Getting Started

Once you have registered for a data services account with New Mexico MLS, login into your account to view the status of your account and retrieve the bearer token. This information can be found under Account Summary.

Login to Vendor Dashboard

If you are not registered with New Mexico MLS click here to register.

Authentication

New Mexico MLS's web API supports OpenID and OAuth2 authorization/authentication protocols, and as part of previous web API certifications, is OpenID certified. Our API supports several grant types, however, we simplify the authentication process by providing a Bearer Token to our vendors.

To access the API, simply pass your bearer token under the Authorization header:

https://api.nm.realestatedata.com/redata/odata

GET /redata/odata HTTP/1.1
Host: https://api.nm.realestatedata.com
Authorization: YourBearerToken

Response:

{
    "@odata.context": "https://api.nm.realestatedata.com/redata/odata/$metadata",
    "value": [
        {
            "name": "Property",
            "url": "https://api.nm.realestatedata.com/redata/odata/Property"
        },
        {
            "name": "Member",
            "url": "https://api.nm.realestatedata.com/redata/odata /Member"
        },
        {
            "name": "Office",
            "url": "https://api.nm.realestatedata.com/redata/odata/Office"
        },
        {
            "name": "OpenHouse",
            "url": "https://api.nm.realestatedata.com/redata/odata/OpenHouse"
        },
        {
            "name": "Media",
            "url": "https://api.nm.realestatedata.com/redata/odata/Media"
        },
        {
            "name": "DataSystem",
            "url": "https://api.nm.realestatedata.com/redata/odata/DataSystem"
        },
        {
            "name": "Resource",
            "url": "https://api.nm.realestatedata.com/redata/odata/Resource"
        },
        {
            "name": "PropertyGreenVerification",
            "url": "https://api.nm.realestatedata.com/redata/odata/PropertyGreenVerification"
        },
        {
            "name": "PropertyUnitTypes",
            "url": "https://api.nm.realestatedata.com/redata/odata/PropertyUnitTypes"
        },
        {
            "name": "HistoryTransactional",
            "url": "https://api.nm.realestatedata.com/redata/odata/HistoryTransactional"
        },
        {
            "name": "HistoryTransactional",
            "url": "https://api.nm.realestatedata.com/redata/odata/HistoryTransactional"
        },
        {
            "name": "Adu",
            "url": "https://api.nm.realestatedata.com/redata/odata/Adu"
        },
        {
            "name": "Lookup",
            "url": "https://api.nm.realestatedata.com/redata/odata/Lookup"
        }
    ]
}

https://api.nm.realestatedata.com/redata/odata is the Web API's Odata endpoint. See the next section, Odata Endpoints for more information on pulling data through resource endpoints.