---
title: "Certificates, inspections and maintenance plans"
method: GET
path: "/api/v1/compliance"
tags: ["Maintenance"]
---

# Certificates, inspections and maintenance plans

`GET /api/v1/compliance`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/compliance`
- Auth: API key in cookie `better-auth.session_token`

Everything that has to stay in date before a unit may be let. Certificate status is recomputed from the expiry date on every read, so a row written months ago cannot report itself valid.

## Response `200`

The compliance calendar.

- object
  - `ok` unknown, required
  - `data` object, required
    - `certificates` object[], required: Status is derived from the expiry date at the moment you ask, never trusted as stored.
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `type` string, required: `epc`, `electrical`, `gas`, `boiler_service`, `chimney`, `asbestos` and the rest.
      - `buildingId` string: Stable record id, e.g. `lse_012`.
      - `unitId` string: Stable record id, e.g. `lse_012`.
      - `reference` string
      - `issuedOn` string, required: A calendar date, `YYYY-MM-DD`.
      - `validUntil` string: A calendar date, `YYYY-MM-DD`.
      - `issuedBy` string
      - `documentId` string: Stable record id, e.g. `lse_012`.
      - `status` 'valid' | 'expiring' | 'expired' | 'missing' | 'not_applicable', required
      - `mandatory` boolean, required: Whether this jurisdiction legally requires it before the unit may be let.
      - `notes` string
    - `inspections` object[], required
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `unitId` string, required: Stable record id, e.g. `lse_012`.
      - `leaseId` string: Stable record id, e.g. `lse_012`.
      - `kind` 'move_in' | 'move_out' | 'interim' | 'annual' | 'handover', required
      - `scheduledFor` string: A calendar date, `YYYY-MM-DD`.
      - `completedOn` string: A calendar date, `YYYY-MM-DD`.
      - `status` 'scheduled' | 'in_progress' | 'completed' | 'signed' | 'disputed', required
      - `inspectorId` string: Stable record id, e.g. `lse_012`.
      - `attendees` string[], required
      - `items` object[], required
        - `id` string, required: Stable record id, e.g. `lse_012`.
        - `room` string, required
        - `element` string, required
        - `condition` 'excellent' | 'good' | 'fair' | 'poor' | 'damaged', required
        - `notes` string
        - `photoRefs` string[], required
        - `changedSinceMoveIn` boolean: Move-out only: whether this was already like this at move-in.
        - `liability` 'wear_and_tear' | 'tenant' | 'owner' | 'undetermined': The call on wear and tear against chargeable damage.
        - `estimatedCost` integer: Money, always in integer cents. €1,250.00 is 125000.
      - `meterReadingIds` string[], required
      - `documentIds` string[], required
      - `comparisonSummary` string: How this compares to the move-in inspection, written by the AI.
      - `signedBy` object[], required
        - `contactId` string, required: Stable record id, e.g. `lse_012`.
        - `signedAt` string, required: ISO 8601 timestamp.
      - `unitLabel` string, required: The unit as a person says it, resolved so an owner’s building alias is honoured.
    - `plans` object[], required: Recurring obligations. `obligation: legal` is the set that cannot be quietly skipped.
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `buildingId` string, required: Stable record id, e.g. `lse_012`.
      - `unitId` string: Stable record id, e.g. `lse_012`.
      - `name` string, required
      - `trade` string, required
      - `obligation` 'legal' | 'contractual' | 'best_practice', required: A legal obligation cannot be silently skipped, which is what separates it from good practice.
      - `intervalMonths` number, required
      - `lastDoneOn` string: A calendar date, `YYYY-MM-DD`.
      - `nextDueOn` string, required: A calendar date, `YYYY-MM-DD`.
      - `leadTimeDays` number, required: How far ahead of the due date the work has to be booked.
      - `estimatedCost` integer: Money, always in integer cents. €1,250.00 is 125000.
      - `preferredContractorId` string: Stable record id, e.g. `lse_012`.
      - `producesCertificateType` string: The certificate this service produces, if it produces one.
      - `active` boolean, required
      - `buildingLabel` string, required: The building an owner alias is honoured for.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
