curl --request POST \
--url https://api.roofkit.ai/api/v1/report-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"address": "100 Congress Ave, Austin, TX 78701",
"lat": 30.2672,
"lng": -97.7431,
"external_report_id": "inspection-77",
"roof_material": "shingle"
}
'import requests
url = "https://api.roofkit.ai/api/v1/report-requests"
payload = {
"address": "100 Congress Ave, Austin, TX 78701",
"lat": 30.2672,
"lng": -97.7431,
"external_report_id": "inspection-77",
"roof_material": "shingle"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
address: '100 Congress Ave, Austin, TX 78701',
lat: 30.2672,
lng: -97.7431,
external_report_id: 'inspection-77',
roof_material: 'shingle'
})
};
fetch('https://api.roofkit.ai/api/v1/report-requests', 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://api.roofkit.ai/api/v1/report-requests",
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([
'address' => '100 Congress Ave, Austin, TX 78701',
'lat' => 30.2672,
'lng' => -97.7431,
'external_report_id' => 'inspection-77',
'roof_material' => 'shingle'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.roofkit.ai/api/v1/report-requests"
payload := strings.NewReader("{\n \"address\": \"100 Congress Ave, Austin, TX 78701\",\n \"lat\": 30.2672,\n \"lng\": -97.7431,\n \"external_report_id\": \"inspection-77\",\n \"roof_material\": \"shingle\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.roofkit.ai/api/v1/report-requests")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"100 Congress Ave, Austin, TX 78701\",\n \"lat\": 30.2672,\n \"lng\": -97.7431,\n \"external_report_id\": \"inspection-77\",\n \"roof_material\": \"shingle\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roofkit.ai/api/v1/report-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"100 Congress Ave, Austin, TX 78701\",\n \"lat\": 30.2672,\n \"lng\": -97.7431,\n \"external_report_id\": \"inspection-77\",\n \"roof_material\": \"shingle\"\n}"
response = http.request(request)
puts response.read_body{
"report_request": {
"id": "rrq_00000000-0000-4000-8000-000000000000",
"status": "preparing",
"report_id": "<string>",
"address": "<string>",
"render_3d": {
"status": "pending",
"failure_code": "<string>",
"download_url": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"source": "partner_api",
"attention_reason": "needs_outline",
"failure_code": "<string>",
"external_report_id": "<string>",
"revision_id": "<string>",
"measurements": {
"version": 1,
"units": {
"area": "sq_ft",
"length": "ft"
},
"roof_area_sqft": 123,
"roof_squares": 123,
"facets": 123,
"suggested_waste_pct": 123,
"waste_table": [
{
"waste_pct": 123,
"area_sqft": 123,
"squares": 123,
"is_suggested": true
}
],
"area_by_pitch": [
{
"pitch": "<string>",
"pitch_rise": 123,
"area_sqft": 123,
"share_pct": 123
}
],
"lengths_ft": {
"eaves": 123,
"eaves_flat": 123,
"eaves_sloped": 123,
"rakes": 123,
"ridges": 123,
"hips": 123,
"valleys": 123,
"step_flashing": 123,
"wall_flashing": 123,
"parapets": 123,
"slope_transitions": 123,
"slope_transitions_pitch_to_pitch": 123,
"slope_transitions_flat_to_pitch": 123,
"drip_edge": 123,
"starter": 123,
"ridge_cap": 123,
"ridge_vent": 123
},
"roof_material": "shingle",
"sloped_area_sqft": 123,
"sloped_squares": 123,
"flat_area_sqft": 123,
"flat_squares": 123,
"steep_slope_area_sqft": 123,
"steep_slope_squares": 123,
"predominant_pitch": "6/12",
"predominant_pitch_rise": 123,
"area_by_pitch_band_sqft": {
"low": 123,
"mid": 123,
"steep": 123
},
"unpitched_area_sqft": 123,
"penetrations": {
"skylights": 123,
"chimneys": 123,
"vents": 123,
"pipe_boots": 123
},
"walls": {
"perimeter_ft": 123,
"gable_area_sqft": 123
},
"metal_panels": {
"stock_ft": 123,
"piece_count": 123,
"is_complete": true
}
},
"report_pdf": {
"export_id": "<string>",
"report_id": "<string>",
"revision_id": "<string>",
"format": "xml",
"file_name": "<string>",
"mime_type": "<string>",
"size_bytes": 1,
"checksum": "<string>",
"role": "export",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>"
},
"report_pdf_failure_code": "<string>",
"ready_at": "2023-11-07T05:31:56Z"
},
"reused": true
}{
"report_request": {
"id": "rrq_00000000-0000-4000-8000-000000000000",
"status": "preparing",
"report_id": "<string>",
"address": "<string>",
"render_3d": {
"status": "pending",
"failure_code": "<string>",
"download_url": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"source": "partner_api",
"attention_reason": "needs_outline",
"failure_code": "<string>",
"external_report_id": "<string>",
"revision_id": "<string>",
"measurements": {
"version": 1,
"units": {
"area": "sq_ft",
"length": "ft"
},
"roof_area_sqft": 123,
"roof_squares": 123,
"facets": 123,
"suggested_waste_pct": 123,
"waste_table": [
{
"waste_pct": 123,
"area_sqft": 123,
"squares": 123,
"is_suggested": true
}
],
"area_by_pitch": [
{
"pitch": "<string>",
"pitch_rise": 123,
"area_sqft": 123,
"share_pct": 123
}
],
"lengths_ft": {
"eaves": 123,
"eaves_flat": 123,
"eaves_sloped": 123,
"rakes": 123,
"ridges": 123,
"hips": 123,
"valleys": 123,
"step_flashing": 123,
"wall_flashing": 123,
"parapets": 123,
"slope_transitions": 123,
"slope_transitions_pitch_to_pitch": 123,
"slope_transitions_flat_to_pitch": 123,
"drip_edge": 123,
"starter": 123,
"ridge_cap": 123,
"ridge_vent": 123
},
"roof_material": "shingle",
"sloped_area_sqft": 123,
"sloped_squares": 123,
"flat_area_sqft": 123,
"flat_squares": 123,
"steep_slope_area_sqft": 123,
"steep_slope_squares": 123,
"predominant_pitch": "6/12",
"predominant_pitch_rise": 123,
"area_by_pitch_band_sqft": {
"low": 123,
"mid": 123,
"steep": 123
},
"unpitched_area_sqft": 123,
"penetrations": {
"skylights": 123,
"chimneys": 123,
"vents": 123,
"pipe_boots": 123
},
"walls": {
"perimeter_ft": 123,
"gable_area_sqft": 123
},
"metal_panels": {
"stock_ft": 123,
"piece_count": 123,
"is_complete": true
}
},
"report_pdf": {
"export_id": "<string>",
"report_id": "<string>",
"revision_id": "<string>",
"format": "xml",
"file_name": "<string>",
"mime_type": "<string>",
"size_bytes": 1,
"checksum": "<string>",
"role": "export",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>"
},
"report_pdf_failure_code": "<string>",
"ready_at": "2023-11-07T05:31:56Z"
},
"reused": true
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "API key does not include the required scope: leads.write.",
"request_id": "req_123",
"details": {
"required_scope": "leads.write",
"missing_scopes": [
"leads.write"
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}Create report request
Creates a roof measurement report from a property address and starts the RoofKit AI measurement. The answer is 202 at once. A report takes about 15 minutes. Poll the request, or subscribe a workspace webhook endpoint to report_request.ready, then read the measurements, the PDF and the 3D model. A create with the external_report_id of a live request returns that request with 200 and starts no new report. When that request is ready and its 3D model failed or is missing, the create makes the model again, at most three times. The workspace pays the report as the app does.
curl --request POST \
--url https://api.roofkit.ai/api/v1/report-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"address": "100 Congress Ave, Austin, TX 78701",
"lat": 30.2672,
"lng": -97.7431,
"external_report_id": "inspection-77",
"roof_material": "shingle"
}
'import requests
url = "https://api.roofkit.ai/api/v1/report-requests"
payload = {
"address": "100 Congress Ave, Austin, TX 78701",
"lat": 30.2672,
"lng": -97.7431,
"external_report_id": "inspection-77",
"roof_material": "shingle"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
address: '100 Congress Ave, Austin, TX 78701',
lat: 30.2672,
lng: -97.7431,
external_report_id: 'inspection-77',
roof_material: 'shingle'
})
};
fetch('https://api.roofkit.ai/api/v1/report-requests', 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://api.roofkit.ai/api/v1/report-requests",
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([
'address' => '100 Congress Ave, Austin, TX 78701',
'lat' => 30.2672,
'lng' => -97.7431,
'external_report_id' => 'inspection-77',
'roof_material' => 'shingle'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.roofkit.ai/api/v1/report-requests"
payload := strings.NewReader("{\n \"address\": \"100 Congress Ave, Austin, TX 78701\",\n \"lat\": 30.2672,\n \"lng\": -97.7431,\n \"external_report_id\": \"inspection-77\",\n \"roof_material\": \"shingle\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.roofkit.ai/api/v1/report-requests")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"100 Congress Ave, Austin, TX 78701\",\n \"lat\": 30.2672,\n \"lng\": -97.7431,\n \"external_report_id\": \"inspection-77\",\n \"roof_material\": \"shingle\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roofkit.ai/api/v1/report-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"100 Congress Ave, Austin, TX 78701\",\n \"lat\": 30.2672,\n \"lng\": -97.7431,\n \"external_report_id\": \"inspection-77\",\n \"roof_material\": \"shingle\"\n}"
response = http.request(request)
puts response.read_body{
"report_request": {
"id": "rrq_00000000-0000-4000-8000-000000000000",
"status": "preparing",
"report_id": "<string>",
"address": "<string>",
"render_3d": {
"status": "pending",
"failure_code": "<string>",
"download_url": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"source": "partner_api",
"attention_reason": "needs_outline",
"failure_code": "<string>",
"external_report_id": "<string>",
"revision_id": "<string>",
"measurements": {
"version": 1,
"units": {
"area": "sq_ft",
"length": "ft"
},
"roof_area_sqft": 123,
"roof_squares": 123,
"facets": 123,
"suggested_waste_pct": 123,
"waste_table": [
{
"waste_pct": 123,
"area_sqft": 123,
"squares": 123,
"is_suggested": true
}
],
"area_by_pitch": [
{
"pitch": "<string>",
"pitch_rise": 123,
"area_sqft": 123,
"share_pct": 123
}
],
"lengths_ft": {
"eaves": 123,
"eaves_flat": 123,
"eaves_sloped": 123,
"rakes": 123,
"ridges": 123,
"hips": 123,
"valleys": 123,
"step_flashing": 123,
"wall_flashing": 123,
"parapets": 123,
"slope_transitions": 123,
"slope_transitions_pitch_to_pitch": 123,
"slope_transitions_flat_to_pitch": 123,
"drip_edge": 123,
"starter": 123,
"ridge_cap": 123,
"ridge_vent": 123
},
"roof_material": "shingle",
"sloped_area_sqft": 123,
"sloped_squares": 123,
"flat_area_sqft": 123,
"flat_squares": 123,
"steep_slope_area_sqft": 123,
"steep_slope_squares": 123,
"predominant_pitch": "6/12",
"predominant_pitch_rise": 123,
"area_by_pitch_band_sqft": {
"low": 123,
"mid": 123,
"steep": 123
},
"unpitched_area_sqft": 123,
"penetrations": {
"skylights": 123,
"chimneys": 123,
"vents": 123,
"pipe_boots": 123
},
"walls": {
"perimeter_ft": 123,
"gable_area_sqft": 123
},
"metal_panels": {
"stock_ft": 123,
"piece_count": 123,
"is_complete": true
}
},
"report_pdf": {
"export_id": "<string>",
"report_id": "<string>",
"revision_id": "<string>",
"format": "xml",
"file_name": "<string>",
"mime_type": "<string>",
"size_bytes": 1,
"checksum": "<string>",
"role": "export",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>"
},
"report_pdf_failure_code": "<string>",
"ready_at": "2023-11-07T05:31:56Z"
},
"reused": true
}{
"report_request": {
"id": "rrq_00000000-0000-4000-8000-000000000000",
"status": "preparing",
"report_id": "<string>",
"address": "<string>",
"render_3d": {
"status": "pending",
"failure_code": "<string>",
"download_url": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"source": "partner_api",
"attention_reason": "needs_outline",
"failure_code": "<string>",
"external_report_id": "<string>",
"revision_id": "<string>",
"measurements": {
"version": 1,
"units": {
"area": "sq_ft",
"length": "ft"
},
"roof_area_sqft": 123,
"roof_squares": 123,
"facets": 123,
"suggested_waste_pct": 123,
"waste_table": [
{
"waste_pct": 123,
"area_sqft": 123,
"squares": 123,
"is_suggested": true
}
],
"area_by_pitch": [
{
"pitch": "<string>",
"pitch_rise": 123,
"area_sqft": 123,
"share_pct": 123
}
],
"lengths_ft": {
"eaves": 123,
"eaves_flat": 123,
"eaves_sloped": 123,
"rakes": 123,
"ridges": 123,
"hips": 123,
"valleys": 123,
"step_flashing": 123,
"wall_flashing": 123,
"parapets": 123,
"slope_transitions": 123,
"slope_transitions_pitch_to_pitch": 123,
"slope_transitions_flat_to_pitch": 123,
"drip_edge": 123,
"starter": 123,
"ridge_cap": 123,
"ridge_vent": 123
},
"roof_material": "shingle",
"sloped_area_sqft": 123,
"sloped_squares": 123,
"flat_area_sqft": 123,
"flat_squares": 123,
"steep_slope_area_sqft": 123,
"steep_slope_squares": 123,
"predominant_pitch": "6/12",
"predominant_pitch_rise": 123,
"area_by_pitch_band_sqft": {
"low": 123,
"mid": 123,
"steep": 123
},
"unpitched_area_sqft": 123,
"penetrations": {
"skylights": 123,
"chimneys": 123,
"vents": 123,
"pipe_boots": 123
},
"walls": {
"perimeter_ft": 123,
"gable_area_sqft": 123
},
"metal_panels": {
"stock_ft": 123,
"piece_count": 123,
"is_complete": true
}
},
"report_pdf": {
"export_id": "<string>",
"report_id": "<string>",
"revision_id": "<string>",
"format": "xml",
"file_name": "<string>",
"mime_type": "<string>",
"size_bytes": 1,
"checksum": "<string>",
"role": "export",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>"
},
"report_pdf_failure_code": "<string>",
"ready_at": "2023-11-07T05:31:56Z"
},
"reused": true
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "API key does not include the required scope: leads.write.",
"request_id": "req_123",
"details": {
"required_scope": "leads.write",
"missing_scopes": [
"leads.write"
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}reports.writeAuthorizations
Use Authorization: Bearer rk_live_....
Headers
A unique value for each new request, such as a UUID. Send the same value to retry a request safely. The same key and payload replay the first response with Idempotency-Replayed: true.
1 - 160Body
3 - 500"100 Congress Ave, Austin, TX 78701"
Google Places id. RoofKit uses it to locate the property when lat and lng are absent.
500Send with lng. Without both, RoofKit locates the address. The AI measures the building nearest to this point.
-90 <= x <= 90-180 <= x <= 180Your id for this report, such as the inspection or job id. A live request with the same id is returned instead of a new report.
200The roof finish. Without it, the team chooses it later in RoofKit.
shingle, tile, metal