Get Comparables Trail
const url = 'https://example.com/api/canvas/example/comparables-trail';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/canvas/example/comparables-trail \ --header 'Authorization: Bearer <token>'Return the typed-constraint trail + ranked comps for deal_id.
Response shape::
{
"deal_id": "...",
"available": True | False,
"subject": {entity_id, address, asset_class, size_sf, ...} | None,
"comps": [{rank, entity_id, name, ...}, ...],
"constraint_trail": {
"compatibility_group": "office" | None,
"asset_classes_allowed": ["office_class_a", ...],
"size_band": [lo, hi] | None,
"vintage_band": [lo, hi] | None,
"submarket": "..." | None,
},
"total_candidates": N,
"returned_count": N,
}
Returns 200 with available: false when the property graph has
not been populated for the deal (e.g. parse-time hook skipped, or
extraction surfaced no subject Asset). The UI renders the empty
state in that case.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Successful Response
Top-level response for GET /canvas/{deal_id}/comparables-trail.
object
Subject Asset metadata — the deal’s underwritten property.
A single Comparable row in the typed-constraint result set.
object
JSON-serialized view of the typed ConstraintTrail dataclass.
Distinct from the ConstraintTrail dataclass at
src/intel/deal_graph/traversal.py — that one is the in-memory typed
constraint record; this is the wire-format Pydantic model the Canvas API
emits. Both must move in lockstep when a constraint field is added.
Examplegenerated
{ "deal_id": "example", "available": true, "subject": { "entity_id": "example", "address": "example", "asset_class": "example", "size_sf": 1, "year_built": 1, "submarket": "example", "market": "example", "property_class": "example" }, "comps": [ { "rank": 1, "entity_id": "example", "name": "example", "address": "example", "asset_class": "example", "size_sf": 1, "year_built": 1, "submarket": "example", "market": "example", "property_class": "example", "sale_price": 1, "rent_psf": 1, "cap_rate": 1, "comp_kind": "example" } ], "constraint_trail": { "compatibility_group": "example", "asset_classes_allowed": [ "example" ], "size_band": [ "example" ], "vintage_band": [ "example" ], "submarket": "example" }, "total_candidates": 1, "returned_count": 1}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}