Set report request roof point
curl --request POST \
--url https://api.roofkit.ai/api/v1/report-requests/{request_id}/roof-point \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"lat": 26.78438,
"lng": -80.03866
}
'import requests
url = "https://api.roofkit.ai/api/v1/report-requests/{request_id}/roof-point"
payload = {
"lat": 26.78438,
"lng": -80.03866
}
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({lat: 26.78438, lng: -80.03866})
};
fetch('https://api.roofkit.ai/api/v1/report-requests/{request_id}/roof-point', 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/{request_id}/roof-point",
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([
'lat' => 26.78438,
'lng' => -80.03866
]),
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/{request_id}/roof-point"
payload := strings.NewReader("{\n \"lat\": 26.78438,\n \"lng\": -80.03866\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/{request_id}/roof-point")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"lat\": 26.78438,\n \"lng\": -80.03866\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roofkit.ai/api/v1/report-requests/{request_id}/roof-point")
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 \"lat\": 26.78438,\n \"lng\": -80.03866\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",
"attention_detail": "roof_not_found",
"failure_code": "<string>",
"external_report_id": "<string>",
"external_id": "<string>",
"revision_id": "<string>",
"revision_number": 123,
"pending_revision_id": "<string>",
"update_failure_code": "<string>",
"edit_url": "<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
}Reports
Set report request roof point
Names the roof of a report request that waits on its outline. The RoofKit AI then traces that roof again, as Pick the roof does in the app. Send it when attention_reason is needs_outline and attention_detail is roof_not_found, address_not_on_roof, or roof_check. The point must be on the roof, within 100 m of the address of the request. The address stays the address of the report. The answer is 202 with the request back at preparing. A traced run uses outline credits, as the first run did. The run acts as the API key or member that created the request, which must still be able to prepare reports. A request takes at most 12 roof points.
POST
/
api
/
v1
/
report-requests
/
{request_id}
/
roof-point
Set report request roof point
curl --request POST \
--url https://api.roofkit.ai/api/v1/report-requests/{request_id}/roof-point \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"lat": 26.78438,
"lng": -80.03866
}
'import requests
url = "https://api.roofkit.ai/api/v1/report-requests/{request_id}/roof-point"
payload = {
"lat": 26.78438,
"lng": -80.03866
}
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({lat: 26.78438, lng: -80.03866})
};
fetch('https://api.roofkit.ai/api/v1/report-requests/{request_id}/roof-point', 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/{request_id}/roof-point",
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([
'lat' => 26.78438,
'lng' => -80.03866
]),
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/{request_id}/roof-point"
payload := strings.NewReader("{\n \"lat\": 26.78438,\n \"lng\": -80.03866\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/{request_id}/roof-point")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"lat\": 26.78438,\n \"lng\": -80.03866\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roofkit.ai/api/v1/report-requests/{request_id}/roof-point")
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 \"lat\": 26.78438,\n \"lng\": -80.03866\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",
"attention_detail": "roof_not_found",
"failure_code": "<string>",
"external_report_id": "<string>",
"external_id": "<string>",
"revision_id": "<string>",
"revision_number": 123,
"pending_revision_id": "<string>",
"update_failure_code": "<string>",
"edit_url": "<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
}Required scopes:
reports.writeHeaders
Body
application/json