> ## Documentation Index
> Fetch the complete documentation index at: https://docs.northaxiumdata.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# Building Inspections

> Inspection records tied to building permits — stage, outcome, deficiencies, and date.

<Info>
  **Initial historical load pending.** Calgary is the first supported city. The endpoint and schema below will be available once the initial official-source backfill is complete.
</Info>

Building inspection records capture the regulatory checks tied to active and completed permits — inspection stage (framing, electrical, plumbing, final), outcome, deficiency information, and the completed date. When linked to a permit record via `permit_number_raw`, you can reconstruct the full construction lifecycle from application through to final approval.

## Endpoint

```
GET /api/v1/inspections
```

## Filters

* `municipality` — city slug
* `permit_number` — link to a parent permit record
* `inspection_type` — e.g. framing, electrical, plumbing, final
* `outcome` — passed, conditional, failed, cancelled, not completed, or other
* `completed_after` / `completed_before` — ISO 8601 completed-date range
* `has_deficiencies` — true or false
* `lat` / `lng` / `radius_km` — proximity search

## Response fields

| Field                       | Type      | Description                                                 |
| --------------------------- | --------- | ----------------------------------------------------------- |
| `record_id`                 | string    | Unique inspection record identifier                         |
| `municipality`              | string    | City slug                                                   |
| `permit_number_raw`         | string    | Source permit number from the originating permit record     |
| `inspection_type`           | string    | Canonical inspection type (e.g. framing, electrical, final) |
| `inspection_type_raw`       | string    | Original type string from the municipality                  |
| `outcome`                   | string    | Normalized municipal outcome                                |
| `outcome_raw`               | string    | Original outcome string from the municipality               |
| `inspection_completed_date` | date      | Date the inspection was completed                           |
| `has_deficiencies`          | boolean   | Whether the source flags non-compliance                     |
| `deficiency_text`           | string    | Municipal inspection comments, when published               |
| `address`                   | string    | Site address                                                |
| `lat` / `lng`               | number    | Geocoded coordinates                                        |
| `source_updated_at`         | timestamp | Last update time published by the municipal source          |
| `last_updated`              | timestamp | Record last updated                                         |
