API ReferencePurple PepperUpdated April 7, 2026
Outstanding Items Router
Outstanding Items Router
The outstandingItems tRPC router exposes four procedures used by the Outstanding Items dashboard view. All procedures are scoped to the authenticated organisation.
outstandingItems.summary
Returns aggregated counts of items requiring attention across the portfolio.
Input: none
Response:
{
pendingTasks: number; // All incomplete todos
overdueTasks: number; // Todos past their due date
expiredCompliance: number; // Compliance docs past expiry
expiringSoonCompliance: number; // Compliance docs approaching expiry
}
outstandingItems.listTodos
Paginated list of all incomplete todos across tenancies, sorted by due date with overdue items first.
Input:
{
limit?: number; // Items per page (default 20)
cursor?: string; // Pagination cursor from previous response
priority?: string; // Filter: "urgent" | "high" | "normal" | "low"
taskType?: string; // Filter by task type code
assignedTo?: string; // Filter by assigned role
overdueOnly?: boolean; // Return only overdue items
}
Response:
{
items: Array<{
id: string;
title: string;
description?: string;
taskType: string;
priority: string;
dueDate?: Date | null;
assignedTo: string;
tenancyId?: string;
propertyAddress?: string;
tenantName?: string;
}>;
nextCursor?: string; // Pass as cursor to fetch the next page
}
outstandingItems.listComplianceItems
Paginated list of expired and expiring-soon compliance documents, joined with property address data.
Input:
{
limit?: number; // Items per page (default 20)
cursor?: string; // Pagination cursor from previous response
status?: "expired" | "expiring_soon"; // Filter by status
docType?: string; // Filter by document type code
}
Response:
{
items: Array<{
id: string;
docType: string; // e.g. "gas_safety", "epc"
status: string; // "expired" | "expiring_soon"
expiryDate?: Date | null;
version?: string | number;
propertyId: string;
propertyAddress?: string;
}>;
nextCursor?: string;
}
outstandingItems.markTodoComplete
Marks a todo as complete. Writes an audit log entry on success.
Input:
{
todoId: string; // ID of the todo to complete
}
Response: { success: true } on success.
Side effects:
- Sets the todo's completed state to
true - Creates an audit log record
- Invalidating
listTodosandsummaryafter calling this procedure is recommended to keep the UI consistent
Document Type Codes
| Code | Label |
|---|---|
gas_safety | Gas Safety |
epc | EPC |
eicr | EICR |
hmo_licence | HMO Licence |
landlord_insurance | Insurance |
deposit_protection | Deposit Protection |
legionella_risk | Legionella |
asbestos_survey | Asbestos |
fire_risk | Fire Risk |
other | Other |
Task Type Codes
| Code | Label |
|---|---|
cost_breakdown_sign | Cost Breakdown |
holding_deposit_pay | Holding Deposit |
tenancy_agreement_sign | Tenancy Agreement |
compliance_doc | Compliance |
custom | Custom |