Create Research Report
curl --request POST \
--url https://data.apartmentiq.io/apartmentiq/api/v2/research_reports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "{account_id}",
"iq_property_id": 781245
}
'import requests
url = "https://data.apartmentiq.io/apartmentiq/api/v2/research_reports"
payload = {
"account_id": "{account_id}",
"iq_property_id": 781245
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '{account_id}', iq_property_id: 781245})
};
fetch('https://data.apartmentiq.io/apartmentiq/api/v2/research_reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://data.apartmentiq.io/apartmentiq/api/v2/research_reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => '{account_id}',
'iq_property_id' => 781245
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://data.apartmentiq.io/apartmentiq/api/v2/research_reports"
payload := strings.NewReader("{\n \"account_id\": \"{account_id}\",\n \"iq_property_id\": 781245\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://data.apartmentiq.io/apartmentiq/api/v2/research_reports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"{account_id}\",\n \"iq_property_id\": 781245\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.apartmentiq.io/apartmentiq/api/v2/research_reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"{account_id}\",\n \"iq_property_id\": 781245\n}"
response = http.request(request)
puts response.read_body{
"id": 52311,
"name": "Marina Landing Report",
"category": "research_report",
"account_id": 1042,
"active": true,
"min_floorplan": 0,
"max_floorplan": 3,
"target_comp_count": 10,
"subject_property": {
"id": 781245,
"custom": false,
"property_name": "Marina Landing",
"address": "401 Riverfront Dr, Austin, TX 78701"
},
"comps": [
{
"property_id": 781266,
"property_name": "Marina Heights",
"score": 0.82
},
{
"property_id": 781301,
"property_name": "Riverside Commons",
"score": 0.74
}
],
"app_url": "https://app.apartmentiq.io/accounts/1042/research-reports/52311/market-survey",
"reactivated": false
}Market Surveys
Create Research Report
Create an active research report with a property as its subject.
Available upon request. This endpoint is not enabled for all customers. Please reach out to your account representative to turn on the Research Report API for your account. The token’s user also needs a research report seat on the account.
- Without
name, the report is named after the property with ” Report” added, for example “Marina Landing Report”. A counter is added if that name is taken. - The floorplan range comes from the bedroom counts the property has advertised, or 0 to 5 (studio to 5 bedrooms) when it has none.
- Without
comp_property_ids, comps are selected automatically, up totarget_comp_countminus the subject (9 by default). Withcomp_property_ids, every ID you send is added, even past that target. - You can create more than one research report for the same property.
reactivatedis alwaysfalse. unit_count_overrideis saved for the property in your account, so it also applies outside this report.- The seat is checked after the request itself is validated, so a request with other problems returns 400, 404 or 422 first.
POST
/
research_reports
Create Research Report
curl --request POST \
--url https://data.apartmentiq.io/apartmentiq/api/v2/research_reports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "{account_id}",
"iq_property_id": 781245
}
'import requests
url = "https://data.apartmentiq.io/apartmentiq/api/v2/research_reports"
payload = {
"account_id": "{account_id}",
"iq_property_id": 781245
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '{account_id}', iq_property_id: 781245})
};
fetch('https://data.apartmentiq.io/apartmentiq/api/v2/research_reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://data.apartmentiq.io/apartmentiq/api/v2/research_reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => '{account_id}',
'iq_property_id' => 781245
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://data.apartmentiq.io/apartmentiq/api/v2/research_reports"
payload := strings.NewReader("{\n \"account_id\": \"{account_id}\",\n \"iq_property_id\": 781245\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://data.apartmentiq.io/apartmentiq/api/v2/research_reports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"{account_id}\",\n \"iq_property_id\": 781245\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.apartmentiq.io/apartmentiq/api/v2/research_reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"{account_id}\",\n \"iq_property_id\": 781245\n}"
response = http.request(request)
puts response.read_body{
"id": 52311,
"name": "Marina Landing Report",
"category": "research_report",
"account_id": 1042,
"active": true,
"min_floorplan": 0,
"max_floorplan": 3,
"target_comp_count": 10,
"subject_property": {
"id": 781245,
"custom": false,
"property_name": "Marina Landing",
"address": "401 Riverfront Dr, Austin, TX 78701"
},
"comps": [
{
"property_id": 781266,
"property_name": "Marina Heights",
"score": 0.82
},
{
"property_id": 781301,
"property_name": "Riverside Commons",
"score": 0.74
}
],
"app_url": "https://app.apartmentiq.io/accounts/1042/research-reports/52311/market-survey",
"reactivated": false
}Authorizations
Body
application/json
Request contract for creating a market survey or research report. Integer fields also accept integer strings such as "300".
Response
The research report was created.
A market survey or research report.