Keysproperty operations Corbelstone Residential

#323 · Inspection overdue · Redwing Mansions

done Sun 08:00 · inspection 556

Ledger row
policy v2
The call
POST /inspections/556/booking
Action, tier
book_inspection, tier 0
Decided by
rules: legionella 0 days overdue and not booked; book the next slot.
Controller
Allowed: book_inspection is tier 0 (just do it); within budget (0 of 40 back-office actions this minute).
authority
conditions
cooldown
budget
Definition
inspection_overdue v1
At stake
legionella 0 days overdue: the building is out of compliance
Outcome
Inspection 556 booked for Tue 03 Nov 09:00.
Undo
Cancel the booking.

Undo

Restores the before-snapshot below and writes a new row.

Evidence

{
  "amount_at_risk": null,
  "building": "Redwing Mansions",
  "building_id": 105,
  "currency": null,
  "days_overdue": 0,
  "due_at": "2026-11-01 00:00:00",
  "firm": "Jansma & Sons Compliance",
  "inspection_id": 556,
  "kind": "legionella",
  "stake_note": "legionella 0 days overdue: the building is out of compliance",
  "started_at": "2026-11-01T00:00:00",
  "vendor_id": 295
}

Before and after

{
  "after": {
    "inspections": [
      {
        "booked_at": "2026-11-01T08:00:00",
        "booked_for": "2026-11-03T09:00:00",
        "done_at": null,
        "id": 556,
        "result": null
      }
    ]
  },
  "before": {
    "inspections": [
      {
        "booked_at": null,
        "booked_for": null,
        "done_at": null,
        "id": 556,
        "result": null
      }
    ]
  },
  "endpoint": "POST /inspections/556/booking",
  "note": "Inspection 556 booked for Tue 03 Nov 09:00.",
  "ok": true,
  "rollback_fn_name": "undo_book_inspection"
}

Arguments

{
  "inspection_id": 556
}