Obtener solicitud de reporte
curl --request GET \
--url https://api.roofkit.ai/api/v1/report-requests/{request_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.roofkit.ai/api/v1/report-requests/{request_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.roofkit.ai/api/v1/report-requests/{request_id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.roofkit.ai/api/v1/report-requests/{request_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.roofkit.ai/api/v1/report-requests/{request_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roofkit.ai/api/v1/report-requests/{request_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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
}{
"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": {}
}
}Reportes
Obtener solicitud de reporte
Devuelve el estado de una solicitud de reporte. Mientras status es preparing, la IA mide el techo. needs_attention significa que el reporte espera al equipo del workspace en RoofKit, por ejemplo para dibujar el contorno. Una vez en ready, el cuerpo incluye las medidas, los metadatos del PDF con su ruta de descarga y el estado del modelo 3D con su ruta de descarga. Cualquier key del workspace con reports.read puede leerla.
GET
/
api
/
v1
/
report-requests
/
{request_id}
Obtener solicitud de reporte
curl --request GET \
--url https://api.roofkit.ai/api/v1/report-requests/{request_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.roofkit.ai/api/v1/report-requests/{request_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.roofkit.ai/api/v1/report-requests/{request_id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.roofkit.ai/api/v1/report-requests/{request_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.roofkit.ai/api/v1/report-requests/{request_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roofkit.ai/api/v1/report-requests/{request_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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
}{
"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": {}
}
}Scopes requeridos:
reports.readAutorizaciones
Usa Authorization: Bearer rk_live_....
Parámetros de ruta
Pattern:
^rrq_[0-9a-fA-F-]{36}$