Base URL: https://api.restats.com
/authorization/loginMethod: POST
Retrieve a Bearer token tied to a username for accessing transactions. Expires after 15 minutes of inactivity.
API-Keyusername - Username to be logged inuser_ip - IP address of the userPOST /authorization/login
Header:
API-Key: your_api_key
Body:
{
"username": "test_user",
"user_ip": "127.0.0.1"
}
{
"token": "BearerTokenHere"
}
/databases/MLSListMethod: GET
Retrieve database list that are available to be subscribed.
fields - Fields to include (comma-separated)filter - Filter (use operators below), e.g., database_name eq TORONTO ONorder_column - Column to sort bysort - 1 (ascending) or 2 (descending)GET /databases/MLSList?filter=database_name eq TORONTO%20ON&order_column=database_name&sort=2
{
"entires": 1,
"result": [
{
"CITY": "Toronto",
"DATABASE_NAME": "TORONTO ON",
"LAST_UPDATED": "2024-11-01 00:00:00",
"MLS_NAME": "Toronto Real Estate Board (TRREB)",
"SHORT_CODE": "TRREB",
"STATE": "ON"
}
],
"status": "OK"
}
/users/CreateUserMethod: POST
Create a new user with the specified parameters.
API-Keyfull_name - Full name of the useroffice_name - Office name of the useroffice_address - Office address of the usercity - City of the userstate - Two-letter state or province codepostal_code - Postal or ZIP codecountry - Either USA or Canadamls_name (array) - MLS namemls_member_id (array) - MLS member IDmls_office_id (array) - MLS office IDdatabase_name (array) - Database name(s) to be assigned to the user. Check /database/MLSList endpoint for available databases.
Include database names for all mls_name included in the mls_name,mls_member_id and mls_office_id parameters.
Only include databases that are related to MLS Names that are being sent.POST /users/CreateUser
Header:
API-Key: your_api_key
Body:
{
"full_name": "John Doe",
"office_name": "Example Realty",
"office_address": "1234 Elm St",
"city": "Waterloo",
"state": "ON",
"postal_code": "N2L 3G1",
"country": "Canada",
"mls_name": ["MLS1", "MLS2"],
"mls_member_id": ["12345", "67890"],
"mls_office_id": ["Office1", "Office2"],
"database_name": ["TORONTO ON", "OTTAWA ON"]
}
{
"message": "User was successfully created",
"status": "OK",
"username": "test_user"
}
/users/UpdateUserStatusMethod: PUT
Activate or deactivate a user.
API-Keyusername - Username of the useractivate - Either 1 (activate) or 0 (deactivate); default is 0PUT /users/UpdateUserStatus
Header:
API-Key: your_api_key
Body:
{
"username": "test_user",
"activate": 0
}
{
"message": "User was successfully deactivated",
"status": "OK"
}
/users/AssignDatabasesMethod: PUT
Assign additional databases to a user. New database assignment requests will be sent for approval.
API-Keydisable_database - Send 1 if you need to disable databases that are sent in the
database_name parameter.
If you send this parameter 1, you do not need to send mls_name, mls_member_id, mls_office_id
parameters. If this is sent 1, all databases in the database_name
must be active and be assigned to the user.
username - Username of the usermls_name (array) - MLS namemls_member_id (array) - MLS member IDmls_office_id (array) - MLS office IDdatabase_name (array) - Database name(s) to be assigned to the user. Check /database/MLSList endpoint for available databases.
Include database names for all mls_name included in the mls_name,mls_member_id and mls_office_id parameters.
Only include databases that are related to MLS Names that are being sent.PUT /users/AssignDatabases
Header:
API-Key: your_api_key
Body:
{
"username": "test_user",
"mls_name": ["MLS1", "MLS2"],
"mls_member_id": ["12345", "67890"],
"mls_office_id": ["Office1", "Office2"],
"database_name": ["TORONTO ON", "OTTAWA ON"]
}
{
"message": "Databases are successfully assigned.",
"status": "OK",
"username": "test_user"
}
/users/SetOfficeCriteriaMethod: POST
This API allows developers to add new criteria for offices associated with a specific username. By providing an office name and its associated wildcard-based criteria, the system stores these details to be used for matching or future operations.
API-Keyoffice_address - To be provided in the offices array. If sent, office address criteria will be also added in addition to office name criteria.
Only one office address can be sent unlike office name criteria.username - The username or identifier for whom the office criteria will be added.offices (array) - A list of office objects, each containing office_name and criteria.office_name - The name of the office to which the criteria will be added.criteria (array) - A list of wildcard patterns for matching office names (case-insensitive).POST /users/SetOfficeCriteria
Header:
API-Key: your_api_key
Body:
{
"username": "john_doe",
"offices": [
{
"office_name": "Re/Max",
"office_address": "60 That St",
"criteria": [
"Re/Max*",
"re/Max*",
"Re/max*"
]
},
{
"office_name": "Coldwell Banker",
"office_address": "24 The Other St",
"criteria": [
"Coldwell*",
"coldwell*",
"COLDWELL*"
]
}
]
}
{
"message": "Office criteria for the user is successfully added.",
"status": "OK"
}
/users/UpdateOfficeCriteriaMethod: PUT
This API allows developers to update existing criteria for offices associated with a specific username. By
providing an office name and its associated wildcard-based criteria, the system updates these details to
be used for matching or future operations. Office names must already be set up for the user to use this endpoint. To add new criteria, use /users/SetOfficeCriteria
API-Keyoffice_address - To be provided in the offices array. If sent, office address
criteria will be also updated in addition to office name criteria.
Only one office address can be sent unlike office name criteria. Send it empty if you want to remove address criteria.
username - The username or identifier for whom the office criteria will be updated.
offices (array) - A list of office objects, each containing office_name and
criteria.
office_name - The name of the office to which the criteria will be updated.office_id - The ID of the office to which the criteria will be updated. Office IDs can be retrieved from /users/GetOfficeCriteriacriteria (array) - A list of wildcard patterns for matching office names
(case-insensitive).
PUT /users/UpdateOfficeCriteria
Header:
API-Key: your_api_key
Body:
{
"username": "john_doe",
"offices": [
{
"office_id": "1",
"office_name": "Re/Max",
"office_address": "60 That St",
"criteria": [
"Re/Max*",
"re/Max*",
"Re/max*"
]
},
{
"office_id": "2",
"office_name": "Coldwell Banker",
"office_address": "24 The Other St",
"criteria": [
"Coldwell*",
"coldwell*",
"COLDWELL*"
]
}
]
}
{
"message": "Office criteria for the user is successfully updated.",
"status": "OK"
}
/users/GetOfficeCriteriaMethod: GET
Retrieves the office criteria set by the user.
API-Keyusername - Username of the user whose office criteria will be retrieved.GET /users/GetOfficeCriteria?username=test_user
Header:
API-Key: your_api_key
{
"result": [
{
"office_id": "1",
"criteria_list": [
{
"criteria": "Re/Max*",
"criteria_id": "1"
},
{
"criteria": "re/Max*",
"criteria_id": "2"
},
{
"criteria": "Re/max*",
"criteria_id": "3"
}
],
"office_address": "24 The Other St.",
"office_name": "Re/Max"
}
],
"status": "OK"
}
/users/DeleteOfficeCriteriaMethod: DELETE
Delete an office criteria linked to a user.
API-Keyusername - Username of the useroffice_id - Office ID to be deleted. Office IDs can be retrieved from /users/GetOfficeCriteriaDELETE /users/DeleteOfficeCriteria
Header:
API-Key: your_api_key
Body:
{
"username": "test_user",
"office_id": 58
}
{
"message": "Office ID was successfully deleted.",
"office_id": 58,
"status": "OK"
}
/transactions/AgentsMethod: GET
Retrieve agents from a specified database, with optional filtering and sorting.
Authorization - Bearer tokendatabase_name - Database name, e.g., "TORONTO ON"rows - Number of rows to retrieveskip - Number of rows to skipfields - Fields to include (comma-separated)filter - Filter (use operators below), e.g., MemberName eq John Doeorder_column - Column to sort bysort - 1 (ascending) or 2 (descending)historical_columns - 1 to include historical columnsproperty_data - 1 to include property data. 0 default.property_filter - Property Filter (use operators below), e.g., DATEOFSALE eq 2025-01-01agent_office_data - 1 to include agents' office data past 6 years. 0 default.agent_office_filter - Agents' Office Filter (use operators below), e.g., Office eq Realty Executives AssociatesGET /transactions/Agents?database_name=TORONTO%20ON&rows=1&filter=MemberName eq John Doe&historical_columns=1&property_data=1&agent_office_data=1
Header:
Authorization: Bearer BearerTokenHere
{
"entires": 50000,
"result": [
{
"5_YR_CLOSED_PCT": "75.1234567",
"5_YR_TOT_LISTINGS": "1500",
"AGENT_OFFICES": [
{
"OFFICENAME": "Office 1",
"YEAR": 2025
},
{
"OFFICENAME": "Office 2",
"YEAR": 2024
},
{
"OFFICENAME": "Office 1",
"YEAR": 2023
},
{
"OFFICENAME": "Office 3",
"YEAR": 2022
}
],
"AVGDOM_LAST12": "45.67",
"AVG_CLOSE_PRICE_LAST12": "650000.00",
"BUYER_SIDE_SALE_COUNT": "320",
"CLOSED_SIDES_PERCENTILE": "1.23",
"CLOSED_VOL_PERCENTILE": "1.56",
"COMPANY": "Fictional Realty",
"DIST_TO_OFFICE": "2.3",
"FIRST_TRANS_DATE": "2015-06-15",
"FIRST_TRANS_DATE_CURRENT_OFFICE": "2015-06-15",
"FULL_NAME_ID": "FAKE NAME ID 1234567",
"HOME_ADDRESS_AVAILABLE": "1",
"LISTING_SIDE_SALE_COUNT": "112",
"LISTSIDEPCT_LAST_12": "8.34",
"MAXTRANSDATE": "2024-10-01",
"MED_CLOSE_PRICE_LAST12": "610000.00",
"MEMBERDIRECTPHONE": "555-123-4567",
"MEMBEREMAIL": "fake.email@example.com",
"MEMBERHOMEPHONE": "555-765-4321",
"MEMBERMLSID": "FAKE-MLS-1234",
"MEMBERMOBILEPHONE": "555-000-0000",
"MEMBERNAME": "John Doe",
"MEMBEROFFICEPHONE": "555-987-6543",
"MEMBERTITLE": "Realtor",
"MLS_TOTAL_CLOSED": "2400",
"NUMBER_OF_COLISTSELL_PARTNERS_LAST_12": "50",
"OFFICEADDRESS1": "123 Fake St",
"OFFICECITY": "Faketown",
"OFFICEKEY": "OFFICE-KEY-001",
"OFFICENAME": "Fictional Brokerage",
"OFFICEPOSTALCODE": "F1K 2B3",
"PCT_CHANGE#": "-3.45",
"PCT_CHANGE$": "-1500000.00",
"PREV_12_UNITS_CALCULATED": "400",
"PREV_12_VOLUME_CALCULATED": "180000000.00",
"PRIMARY_COUNTY": "Fakeland",
"PRODUCTION_ZIP_CODE": "F2K 3A1",
"SIDES_LAST_12": "15",
"SWITCH_COLOR": "Red",
"TOTAL_CLOSED_VOLUME_LAST_12": "190000000.00",
"TRANSACTIONS": [
{
"AGENTROLE": "Listing Agent",
"DATEOFSALE": "2025-01-01",
"PROPERTYSUBTYPE": "Bungalow 1 Storey",
"PROPERTYTYPE": "Residential"
},
{
"AGENTROLE": "Buying Agent",
"DATEOFSALE": "2025-01-08",
"PROPERTYSUBTYPE": "2 Storey",
"PROPERTYTYPE": "Residential"
}
],
"TRANSACTIONS_LAST_12": "450",
"UPDATE_DATE": "2024-10-20 12:34:56",
"YRCHANGE#": "-50",
"YRCHANGE$": "-5000000.00"
}
],
"status": "OK"
}
/transactions/InactiveAgentsMethod: GET
Retrieve inactive agents (agents without any transactions) from a specified database, with optional filtering and sorting.
Authorization - Bearer tokendatabase_name - Database name, e.g., "TORONTO ON"rows - Number of rows to retrieveskip - Number of rows to skipfields - Fields to include (comma-separated)filter - Filter (use operators below), e.g., MemberName eq John Doe
order_column - Column to sort bysort - 1 (ascending) or 2 (descending)GET /transactions/InactiveAgents?database_name=TORONTO%20ON&rows=1&filter=MemberName eq John Doe
Header:
Authorization: Bearer BearerTokenHere
{
"entires": 10000,
"result": [
{
"EMAIL": "fake.email@example.com",
"HOME_ADDRESS_AVAILABLE": "123 Fake St",
"MEMBERDIRECTPHONE": "000-000-0000",
"MEMBERID": "FAKE-MLS-1234",
"MEMBERMOBILEPHONE": "000-000-0000",
"MEMBERNAME": "John Doe",
"MEMBERTITLE": Fake Realtor",
"OFFICEADDRESS": "123 Fake St",
"OFFICECITY": "Faketown",
"OFFICEID": "OFFICE-ID-001",
"OFFICENAME": "Fictional Brokerage",
"OFFICEPOSTALCODE": "F1K 2B3",
"OFFICESTATE": "BC"
}
],
"status": "OK"
}
/transactions/MigrationGraphMethod: GET
Retrieve migration counts by office using the user criteria. Office criteria must be set using /users/SetOfficeCriteria to use this function.
Authorization - Bearer tokendatabase_name - Database name, e.g., "TORONTO ON"GET /transactions/MigrationGraph?database_name=TORONTO%20ON
Header:
Authorization: Bearer BearerTokenHere
{
"Coldwell Banker": {
"gained": 210,
"lost": 241
},
"Re/Max": {
"gained": 27,
"lost": 50
},
"others": {
"gained": 600,
"lost": 596
}
}
Operators available for filtering data:
and operator can be used. Example: MemberName eq John Doe and transactions_last_12 ge 1000
eq - Equalsne - Not equalsgt - Greater thange - Greater than or equal tolt - Less thanle - Less than or equal tomc - Multiple Criteria (Example: PRODUCTION_ZIP_CODE mc 63303,63376)