All Collections
Using PropertyRadar
Understand
Using the PropertyRadar Import API
Using the PropertyRadar Import API
Import a List manually
Updated over a week ago

The PropertyRadar API is REST-based, and uses standard HTTP response codes, authentication, and verbs.

API Import URL

The base API Import URL for read and write operations is:

https://api.propertyradar.com/v1  

All API requests must use HTTPS in order to use this API Import URL.

Format

The API uses JSON-encoded as UTF-8. The Content-Type header should be set to application/JSON. The body of responses is always a JSON object, and the content type is always application/JSON.

Authorization

You can implement Authorization using either Tokens, or OAuth2.

  • Token - customer, long string of char, used to login w/o login & password

  • OAuth - partner, uses partner product, customer types in login & password with your partner product. We then give a token to the partner.

Tokens

The API Authorization is done using API Tokens. The token for your account will be displayed right after you create a list with source API. After creating an Import List, you can find the API Tokens under the List settings for that import list.


OAuth2

We also offer OAuth to allow partners to access our customer's accounts on their behalf.

To call our API you must provide API Authorization implementing the OAuth2.0 protocol using the token provided as a bearer token.

The header should be set to the following:

"Authorization": Bearer {{Token}}

Manually Import a New List in PropertyRadar

To program your own import, begin by logging into the PropertyRadar app. Review the general information in Importing a New List.

  1. Create a new Import List by opening My Lists, selecting the New List menu, and choosing Import List.

  2. In the Import New List window, select the API option as your Source.
    Select your other import options including Match Threshold, Property or Customer List, and Importing Names; additionally, you can type an List Name for your list.

  3. Click Continue.
    The API Import dialog box displays the API Import URL and API Access Token, and provides a copy icon for each. You can also find this information using the List Settings in My Lists. Note each list will have a different URL.

  4. Call the API to import records.

    POST data to the Endpoint: https://api.propertyradar.com/v1/list/{ListID}/import/items
    (use your API Import URL from step 3 above, including the specific ListID)

    URL Params: You must add the URL param 'Purchase' with value 1 to make the automated purchase of the list.

    Purchase=1


    A Purchase setting of 1 tells the API to purchase records that you import automatically. At this time a purchase setting of 0 is not supported. These purchases occur against your Purchase Balance, which you can add to using your PropertyRadar account. Check your Low Balance Notification and Auto Recharge settings to avoid errors due to an insufficient balance. Review Import pricing information.

    Headers: Add the headers following headers, with the Authorization Token found in the instructions above.

    Authorization: Bearer {{Token}}
    Content-Type: application/json


    Request Body: JSON-encoded array of values max 10,000 items per call


    You must include one of the following sets of data:

    Body Example:

    [{
    "FirstName": "STEPHEN",
    "LastName": "HARRELSON",
    "FullName": "STEPHEN HARRELSON",
    "Email": "stephen@email.com",
    "Phone": "818-842-8902",
    "Address": "1321 S SCOTT ST",
    "City": "LITTLE ROCK",
    "State": "AR",
    "ZipFive": "72201",
    "County": "PULASKI",
    "APN": "34L-020-02-003-00"
    },
    {
    "FullName":"NIMES PROPERTY LLC",
    "City": "LOS ANGELES",
    "State": "CA",
    "APN": "4362-016-008"
    },
    {
    "Email": "jryu800anrobey@aol.com",
    "Phone": "310-396-2174",
    }]


    At the end of this article, you'll find code examples to call this endpoint in the API Call Examples section.

  5. Handle the response

    Verify that the call is successful and returns with a status code of 200 (success). See below for an example response, which includes the number of records received, which you can use to verify against the number of records you intended to send.

    Status Code: 200
    Response Body:

    {
    "results": [],
    "success": true,
    "updateCount": 10000
    }


Error Handling

If you get a Status Code different from 200, you need to handle the error. The errors you receive from the API include the following items:

  • error - Short description of the error.

  • errors - Array of errors in case of having more than one.

  • eventid - ID of the error to be provided to support in case you need help.

  • userMessage (optional) - If the error requires more information, it will obtain this parameter.

  • messageTitle (optional) - In case you get a userMessage this title will be useful to show the message to final users.

    HTTP Error Codes
    400 - Bad Request - Review the error in the response and/or user message.
    404 - URL not existing - Review the URL.
    503 - Internal server error - Please contact support and provide the eventid code.

Common Errors and Possible Solutions

Not setting the Token to make the call or setting it incorrectly.

Status Code: 400

{
"error": "invalid_token - Invalid access token",
"errors": [
"invalid_token - Invalid access token"
],
"eventid": "0db-903-920"
}

Possible Solution: Check and add the token to the headers.

Not setting the param Purchase or setting it different from 1.

Status Code: 400

{
"error": "Invalid Purchase param value",
"errors": [
"Invalid Purchase param value"
],
"eventid": "a7d-47a-617",
"message": "We currently require the Purchase parameter to be set to true as we do not yet offer another way to purchase and finalize your import.",
"messageTitle": "Invalid Purchase param value"
}

Possible Solution: Add the Param 'Purchase' in the URL setting the value = 1.

Insufficient balance to purchase the import.

Status Code: 400

{
"error": "Insufficient Balance",
"errors": [
"Insufficient Balance"
],
"eventid": "a7d-47a-617",
"message": "Your account balance is insufficient to process this request. Log in at app.propertyradar.com to Add to Balance, and consider changing your Low Balance Notification and Auto Recharge settings.",
"messageTitle": "Insufficient Balance"
}

Possible Solution: Add balance to your account and consider changing your auto recharge settings.

Exceeding the limit of records per call.

Status Code: 400

{
"error": "List Import Limit Exceeded",
"errors": [
"List Import Limit Exceeded"
],
"eventid": "a7d-47a-617",
"message": "You have exceeded the maximum number of records allowed per request on an import list. Please try your request again with at most 10000 records.",
"messageTitle": "Import List Limit Exceeded"
}

Possible Solution: Send a request with less than 10000 records.

Exceeding the limit of records to import in a single list.

Status Code: 400

{
"error": "List Import Limit Reached",
"errors": [
"List Import Limit Reached"
],
"eventid": "a7d-47a-617",
"message": "You have reached the maximum number of records allowed on an import list of 450000 records.",
"messageTitle": "Import List Limit"
}

Possible Solution: Create a new import list to load the new records.

Review Matches

Finally, you can check the List import by opening My Lists in the PropertyRadar app.

Once the list has been completely processed, you can review the matches manually.

API Call Examples

API Call examples are provided for cURL, Php, Python, Java, .NET (C#), GO, Node JS, and Ruby.

cURL

curl --location --request POST 'https://api.propertyradar.com/v1/list/{listID}/import/items?Purchase=1' \ 
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"FirstName": "STEPHEN",
"LastName": "HARRELSON",
"FullName": "STEPHEN HARRELSON",
"Email": "stephen@email.com",
"Phone": "818-842-8902",
"Address": "1321 S SCOTT ST",
"City": "LITTLE ROCK",
"State": "AR",
"ZipFive": "72201",
"County": "PULASKI",
"APN": "34L-020-02-003-00"
}
]'

Php

<?php 
$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => 'https://api.propertyradar.com/v1/list/{listID}/import/items?Purchase=1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'[
{
"FirstName": "STEPHEN",
"LastName": "HARRELSON",
"FullName": "STEPHEN HARRELSON",
"Email": "stephen@email.com",
"Phone": "818-842-8902",
"Address": "1321 S SCOTT ST",
"City": "LITTLE ROCK",
"State": "AR",
"ZipFive": "72201",
"County": "PULASKI",
"APN": "34L-020-02-003-00"
}
]',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{Token}}',
'Content-Type: application/json' ),
));
$response = curl_exec($curl);
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if($httpcode == 200) {
echo "OK";
} else {
echo "ERROR";
}
echo $response;

Python

import requests 
import json
url = "https://api.propertyradar.com/v1/list/{listID}/import/items?Purchase=1"
payload = json.dumps([
{
"FirstName": "STEPHEN",
"LastName": "HARRELSON",
"FullName": "STEPHEN HARRELSON",
"Email": "stephen@email.com",
"Phone": "818-842-8902",
"Address": "1321 S SCOTT ST",
"City": "LITTLE ROCK",
"State": "AR",
"ZipFive": "72201",
"County": "PULASKI",
"APN": "34L-020-02-003-00"
}
])
headers = { 'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json'}
response = requests.request("POST", url, headers=headers, data=payload)
httpcode = response.status_code
if(httpcode == 200) {
print("OK")
} else {
print("ERROR")
}
print(response.text)

Java

OkHttpClient client = new OkHttpClient().newBuilder().build(); MediaType mediaType = MediaType.parse("application/json"); 
RequestBody body = RequestBody.create(mediaType, "[{\n \"FirstName\": \"STEPHEN\",\n \"LastName\": \"HARRELSON\",\n \"FullName\": \"STEPHEN HARRELSON\",\n \"Email\": \"stephen@email.com\",\n \"Phone\": \"818-842-8902\",\n \"Address\": \"1321 S SCOTT ST\",\n \"City\": \"LITTLE ROCK\",\n \"State\": \"AR\",\n \"ZipFive\": \"72201\",\n \"County\": \"PULASKI\",\n \"APN\": \"34L-020-02-003-00\"\n}]");
Request request = new Request.Builder().url("https://api.propertyradar.com/v1/list/{listID}/import/items?Purchase=1").method("POST", body).addHeader("Authorization", "Bearer {{Token}}") .addHeader("Content-Type", "application/json").build();
Response response = client.newCall(request).execute();
int httpcode = response.code();
if(httpcode == 200){
System.out.print("OK");
} else {
System.out.print("ERROR");
}

.NET (C#)

var client = new RestClient("https://api.propertyradar.com/v1/list/{listID}/import/items?Purchase=1");
client.Timeout = -1;
var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer {{Token}}"); request.AddHeader("Content-Type", "application/json");
var body = @"[" + "\n" +
@" {" + "\n" + @" ""FirstName"": ""STEPHEN""," + "\n" +
@" ""LastName"": ""HARRELSON""," + "\n" +
@" ""FullName"": ""STEPHEN HARRELSON""," + "\n" +
@" ""Email"": ""stephen@email.com""," + "\n" +
@" ""Phone"": ""818-842-8902""," + "\n" +
@" ""Address"": ""1321 S SCOTT ST""," + "\n" +
@" ""City"": ""LITTLE ROCK""," + "\n" +
@" ""State"": ""AR""," + "\n" +
@" ""ZipFive"": ""72201""," + "\n" +
@" ""County"": ""PULASKI""," + "\n" +
@" ""APN"": ""34L-020-02-003-00""" + "\n" +
@" }" + "\n" +
@"]";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);
var httpcode = response.StatusCode.ToString();
if(httpcode == "200"){
Console.WriteLine("OK");
} else {
Console.WriteLine("ERROR");
}

GO

package main 
import ( "fmt" "strings" "net/http" "io/ioutil" )
func main() {
url := "https://api.propertyradar.com/v1/list/{listID}/import/items?Purchase=1"
method := "POST"
payload := strings.NewReader(`[
{
"FirstName": "STEPHEN",
"LastName": "HARRELSON",
"FullName": "STEPHEN HARRELSON",
"Email": "stephen@email.com",
"Phone": "818-842-8902",
"Address": "1321 S SCOTT ST",
"City": "LITTLE ROCK",
"State": "AR",
"ZipFive": "72201",
"County": "PULASKI",
"APN": "34L-020-02-003-00"
}
]`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer {{Token}}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
httpcode := res.StatusCode
if err != nil {
fmt.Println(err)
return
} else {
if(httpcode == 200) {
fmt.Println("OK")
} else {
fmt.Println("ERROR")
}
}
fmt.Println(string(body))
}

Node JS

var https = require('follow-redirects').https; 
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'https://api.propertyradar.com',
'path': '/v1/list/{listID}/import/items?Purchase=1',
'headers': { 'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
if(res.statusCode == 200) {
console.log("OK");
} else {
console.log("ERROR");
}
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});

res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});

res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify([
{
"FirstName": "STEPHEN",
"LastName": "HARRELSON",
"FullName": "STEPHEN HARRELSON",
"Email": "stephen@email.com",
"Phone": "818-842-8902",
"Address": "1321 S SCOTT ST",
"City": "LITTLE ROCK",
"State": "AR",
"ZipFive": "72201",
"County": "PULASKI",
"APN": "34L-020-02-003-00"
}
]);
req.write(postData);
req.end();

Ruby

require "uri" 
require "json"
require "net/http"

url = URI("https://api.propertyradar.com/v1/list/{listID}/import/items?Purchase=1")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer {{Token}}"
request["Content-Type"] = "application/json"
request.body = JSON.dump([
{
"FirstName": "STEPHEN",
"LastName": "HARRELSON",
"FullName": "STEPHEN HARRELSON",
"Email": "stephen@email.com",
"Phone": "818-842-8902",
"Address": "1321 S SCOTT ST",
"City": "LITTLE ROCK",
"State": "AR",
"ZipFive": "72201",
"County": "PULASKI",
"APN": "34L-020-02-003-00"
}
])
response = https.request(request)
puts response.read_body
if response.code == 200
puts "OK"
else
puts "ERROR"
end

Did this answer your question?