{
  "components": {
    "schemas": {
      "Assessment": {
        "properties": {
          "comparables": {
            "items": {
              "$ref": "#/components/schemas/Comparable"
            },
            "title": "Comparables",
            "type": "array"
          },
          "disclaimer": {
            "title": "Disclaimer",
            "type": "string"
          },
          "drivers": {
            "description": "Public-record observations",
            "items": {
              "type": "string"
            },
            "title": "Drivers",
            "type": "array"
          },
          "generated_at": {
            "description": "ISO-8601 UTC",
            "title": "Generated At",
            "type": "string"
          },
          "prepared_for": {
            "description": "Account attribution / watermark",
            "title": "Prepared For",
            "type": "string"
          },
          "ref_id": {
            "description": "Human-readable reference for this output",
            "title": "Ref Id",
            "type": "string"
          },
          "risk_band": {
            "$ref": "#/components/schemas/RiskBand"
          },
          "risk_summary": {
            "description": "Plain-language, public-record framing",
            "title": "Risk Summary",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AssessmentStatus"
          },
          "timeline_months": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimelineMonths"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "risk_band",
          "risk_summary",
          "status",
          "generated_at",
          "ref_id",
          "prepared_for",
          "disclaimer"
        ],
        "title": "Assessment",
        "type": "object"
      },
      "AssessmentResponse": {
        "properties": {
          "assessment": {
            "$ref": "#/components/schemas/Assessment"
          },
          "parcel": {
            "$ref": "#/components/schemas/Parcel"
          }
        },
        "required": [
          "parcel",
          "assessment"
        ],
        "title": "AssessmentResponse",
        "type": "object"
      },
      "AssessmentStatus": {
        "enum": [
          "ready",
          "preliminary",
          "under_review"
        ],
        "title": "AssessmentStatus",
        "type": "string"
      },
      "Comparable": {
        "properties": {
          "body": {
            "description": "Public body, e.g. 'City Council'",
            "title": "Body",
            "type": "string"
          },
          "date": {
            "description": "Month of the decision, 'YYYY-MM' or a display label",
            "title": "Date",
            "type": "string"
          },
          "outcome": {
            "description": "e.g. 'denied', 'approved', 'continued'",
            "title": "Outcome",
            "type": "string"
          },
          "public_record_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Link to the PUBLIC record \u2014 never to internal data",
            "title": "Public Record Url"
          },
          "type": {
            "description": "e.g. 'variance', 'rezoning'",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "outcome",
          "body",
          "date"
        ],
        "title": "Comparable",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "Parcel": {
        "properties": {
          "address": {
            "title": "Address",
            "type": "string"
          },
          "apn": {
            "title": "Apn",
            "type": "string"
          },
          "jurisdiction": {
            "title": "Jurisdiction",
            "type": "string"
          }
        },
        "required": [
          "apn",
          "address",
          "jurisdiction"
        ],
        "title": "Parcel",
        "type": "object"
      },
      "RiskBand": {
        "enum": [
          "low",
          "moderate",
          "high",
          "preliminary"
        ],
        "title": "RiskBand",
        "type": "string"
      },
      "TimelineMonths": {
        "properties": {
          "high": {
            "description": "High end of the range",
            "title": "High",
            "type": "integer"
          },
          "low": {
            "description": "Low end of the estimated months-to-decision range",
            "title": "Low",
            "type": "integer"
          }
        },
        "required": [
          "low",
          "high"
        ],
        "title": "TimelineMonths",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "WebhookSubscriptionResponse": {
        "description": "The secret is only ever present in the create response -- store it now,\nit can't be retrieved again.",
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          },
          "event": {
            "title": "Event",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "event",
          "active"
        ],
        "title": "WebhookSubscriptionResponse",
        "type": "object"
      }
    }
  },
  "info": {
    "description": "Curated public contract for api.bouleintel.com/v1. This is a subset of the application's full schema -- it does not include internal, admin, or customer-dashboard routes. Generated by scripts/export_partner_openapi.py, not scripts/export_openapi.py.",
    "title": "Boule Intel Partner API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/assessments": {
      "post": {
        "operationId": "create_assessment_v1_assessments_post",
        "parameters": [
          {
            "in": "header",
            "name": "x-customer-api-key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Customer-Api-Key"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "title": "Payload",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Assessment",
        "tags": [
          "public"
        ]
      }
    },
    "/v1/parcels/{apn}/assessment": {
      "get": {
        "operationId": "get_assessment_v1_parcels__apn__assessment_get",
        "parameters": [
          {
            "in": "path",
            "name": "apn",
            "required": true,
            "schema": {
              "title": "Apn",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "x-customer-api-key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Customer-Api-Key"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssessmentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Assessment",
        "tags": [
          "public"
        ]
      }
    },
    "/v1/parcels/{apn}/comparables": {
      "get": {
        "operationId": "get_comparables_v1_parcels__apn__comparables_get",
        "parameters": [
          {
            "in": "path",
            "name": "apn",
            "required": true,
            "schema": {
              "title": "Apn",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 3,
              "maximum": 6,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "x-customer-api-key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Customer-Api-Key"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssessmentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Comparables",
        "tags": [
          "public"
        ]
      }
    },
    "/v1/watchlist": {
      "post": {
        "operationId": "add_watch_v1_watchlist_post",
        "parameters": [
          {
            "in": "header",
            "name": "x-customer-api-key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Customer-Api-Key"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "title": "Payload",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Add Watch V1 Watchlist Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Watch",
        "tags": [
          "public"
        ]
      }
    },
    "/v1/webhook-subscriptions": {
      "post": {
        "operationId": "create_webhook_subscription_v1_webhook_subscriptions_post",
        "parameters": [
          {
            "in": "header",
            "name": "x-customer-api-key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Customer-Api-Key"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "title": "Payload",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Webhook Subscription",
        "tags": [
          "public"
        ]
      }
    },
    "/v1/webhook-subscriptions/{subscription_id}": {
      "delete": {
        "operationId": "delete_webhook_subscription_v1_webhook_subscriptions__subscription_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "title": "Subscription Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "x-customer-api-key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Customer-Api-Key"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Delete Webhook Subscription V1 Webhook Subscriptions  Subscription Id  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Webhook Subscription",
        "tags": [
          "public"
        ]
      }
    }
  }
}
