RentScore API - Getting Started Guide
Introduction
The API Access is included in the Developer plan of RentScore. This API allows other applications to integrate RentScore's property analysis.
Generate API token
An API Token is a distinctive authentication key, serving as a secure and unique identifier. It plays a pivotal role in validating the identity of the entity making API requests.
Please ensure you're subscribed to either of the Developer plan (Monthly / Yearly). If you're, please follow the below steps to generate your API token.
Login to your account at RentScore AI
Navigate to "My Profile" by clicking on your profile icon at the top right
Scroll down to "API Access" section
Click on "Generate API Token" button
Your token would have been generated by now. Click on copy button next to the token box to copy the token to your clipboard
Where can I find available APIs?
RentScore offers a rich set of endpoints to enhance the developer experience. We offer endpoints from analyzing the property to generating a report of that.
You can read through and understand our APIs via our API Playground which is built by Swagger (API Documentation tool) and that supports Open API specification v3.0.
API Playground
API Playground is a web-based interface that allows developers to visualize and interact with our APIs. It presents endpoints, request parameters, and response formats in an intuitive and interactive manner. It facilitates API testing and exploration, enabling developers to understand, test, and consume APIs more efficiently. We believe this API Playground plays a crucial role in enhancing collaboration between development teams and ensuring a smooth API integration process.
API Playground has 4 sections.
The 1st section describes about the API Documentation. It also has some important links
The 2nd section is where you authenticate yourself. You don't need to do anything on the servers drop-down
The 3rd section is the actual playground, where you can play around the endpoints by changing inputs
The final (4th) section describes the schemas of the request and response of each endpoint
Section 1 - RentScore API Info
The Top section gives you information about the RentScore API. There are quick links added for you to quickly navigate across RentScore platform.
Section 2 - Authenticate
All our API endpoints are secured. No single endpoint can be accessed openly(without a token). So, your very first step on opening API Playground is to authenticate yourself with your token.
Click on the "Authorize" button (which will open a pop-up asking you for a token)
Paste the token in the input box
Click on the "Authorize" button
Close the pop-up
Section 3 - Playground
Relevant API Endpoints are grouped together. In our case, Property Analysis, RentScore, and Status are groups. Each group may contain one or more endpoints.
Each endpoint contains URL, description, input parameters, sample request body, success and error responses with a sample for each code. You can find the description of each field (in the request and response) in the Schemas section.
Example
Let's explore an endpoint with an example. Assume you want to search the property with the address 1401 Stewart Dr, Rockwall, TX 75032.
Open the "/v1/analyze_property" endpoint
As the description of the endpoint says, this endpoint generates a summary of a property
Click on the "Try it out" button below the description
This endpoint accepts only the request body. It should be in JSON format. So, replace the existing request body with the below code.
{ "data": { "address": "1401 Stewart Dr, Rockwall, TX 75032", "reset_cache": false, "is_loan_taken": true } }
This endpoint accepts additional parameters (which you can find in Schema below). The addresses you use will be cached for a short time period. If you want to find the fresh data of the property, turn "reset_cache" to "true". The "is_loan_taken" field is used to describe whether it's a cash or loan purchase.
Click on the "Execute" button to analyze your property
Once that is done, you can find your request URL, the entire request in cURL format, and the response from the server below
Section 4 - Schemas
The last section contains schemas for the available request and response. You can open the schema to learn about the fields.
Here's the exploration of Property Analysis Response schema. This is the schema for the example endpoint which we've seen above.
Points to remember
If you receive either "purchase_price" or "monthly_rental_income" or both as zero (0) while calling "analyze_property" endpoint, this means that we're unable to find your property. In such case, you must update the unknown input fields manually. Fire the "update" endpoint with the unknown values along with "recalculate" field set to true to find the remaining calculation.
In the above example response, you may note that the "rentscore" field is returned as "null". There's a separate endpoint to calculate the RentScore (/v1/rentscore/{id}) under the "RentScore" group in the Playground. You have to call that endpoint everytime you update a value in the property to find the RentScore of your property. We offer the RentScore calculation as a separate endpoint to minimize the time to analyze the property.
Income, Rehab, and Closing cost sections include breakdown values. You may need to enter multiple category of values. We call this as breakdown field in our API. You can create, update, and delete breakdown fields for a property via updating property info endpoint. You can refer the schema for that in "Schemas" section in API Playground
If you want to create a new breakdown field for a property, the "id" should be "randomkey-<random_string>". Replace <random_string> with any random string.
To update a breakdown field, you must pass the "id" received from the server while you create the breakdown field
Postman Collection
We believe most developers are familiar in using the Postman tool. We have a collection for the RentScore endpoints. If you wish to play around our API with the Postman, you can download this Postman collection and import into your Postman tool. You can follow this guide to import the Postman collection, if you have not done that in the past.
You should see the below folder structure once you imported it.
In order to use, you need to configure two environment variables. They are,
RENTSCORE_BASE_URL
RENTSCORE_API_KEY
Please follow this guide to create a new environment if you have not created one yet.
The same documentation also describes about adding an environment variable. You can follow their steps to add an environment variable to create the two variables mentioned above.
The value of RENTSCORE_BASE_URL environment variable is https://api.rentscore.ai/api
The value of RENTSCORE_API_KEY environment variable should be the token which you've generated in "My Profile" page of RentScore web app.
That's it. Let's test our APIs with Postman. You can follow this guide to switch to the environment where you've added the two environment variables.
Open the API Status request which is under the "Status" folder and hit the "Send" button.