{"openapi":"3.0.3","info":{"title":"SooLedger by Community Ledger API","version":"1.0.0","description":"Block-level public-disorder records for Sault Ste. Marie. Public routes return only records the deterministic publication rules passed (no human review), through a privacy serializer, minus anything withdrawn (takedowns); business-report counts and totals are null below three distinct businesses, partner-feed counts below three distinct partners, and a block condition below two distinct walkers. Licensed routes need an API key. No personal information, no addresses, no business names — ever. Public GETs are edge-cached for up to an hour."},"servers":[{"url":"https://soo.communityledger.ca"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Licensed API key (scope api:v1)."},"intake":{"type":"http","scheme":"Intake","description":"Business-intake session token (Authorization: Intake <token>), from the magic link."}},"schemas":{"Funnel":{"type":"object","properties":{"incidents":{"type":"integer"},"arrests":{"type":"integer"},"charges":{"type":"integer"},"outcomes":{"type":"integer"},"reportedDamageCad":{"type":"number"}},"description":"Cohort-based: of incidents reported in the window, how many have since reached each stage."},"Incident":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"typeLabel":{"type":"string"},"secondaryTypes":{"type":"array","items":{"type":"string"}},"occurredOn":{"type":"string","nullable":true},"occurredPrecision":{"type":"string","enum":["day","week","month"]},"stage":{"type":"string"},"outcome":{"type":"string","nullable":true},"summary":{"type":"string"},"targetKind":{"type":"string","nullable":true},"blockId":{"type":"string","nullable":true},"area":{"type":"string","nullable":true},"estimatedDamageCad":{"type":"number","nullable":true},"sources":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"publishedAt":{"type":"string","nullable":true}}}}}},"BusinessReportRollup":{"type":"object","description":"k-suppressed: count and total are null until k distinct businesses on the block have reported; an empty block looks the same as a suppressed one.","properties":{"reportCount":{"type":"integer","nullable":true},"totalReportedDamageCad":{"type":"number","nullable":true},"damageSuppressed":{"type":"boolean"},"k":{"type":"integer","example":3}}},"PartnerReportRollup":{"type":"object","description":"Rows from partner feeds (source kind partner_feed): null until k distinct partners have rows on the block; a partner is never named.","properties":{"reportCount":{"type":"integer","nullable":true},"k":{"type":"integer","example":3}}},"ContributedRollup":{"type":"object","description":"Business reports and partner rows together: null until k distinct contributors of either kind exist on the block.","properties":{"reportCount":{"type":"integer","nullable":true},"k":{"type":"integer","example":3}}},"BlockCondition":{"type":"object","nullable":true,"description":"Latest block-walk checklist values; null until two distinct auditors have walked the block in the last 90 days (who walked it is never published).","properties":{"latestOn":{"type":"string","format":"date"},"auditors":{"type":"integer"},"auditsInWindow":{"type":"integer"},"windowDays":{"type":"integer","example":90},"boardedStorefronts":{"type":"integer"},"vacantUnits":{"type":"integer"},"graffiti":{"type":"integer","enum":[0,1,2],"description":"0 none, 1 some, 2 heavy"},"needlesOrParaphernalia":{"type":"integer","enum":[0,1,2]},"brokenGlassOrDamage":{"type":"integer","enum":[0,1,2]},"lightingOut":{"type":"integer"},"camerasVisible":{"type":"integer"},"encampmentPresent":{"type":"boolean"}}},"FeedRow":{"type":"object","description":"One partner-feed row as sent. The location is resolved to a hundred-block (or a street, for an intersection the city index cannot place) and is not stored. notes and ref are private.","required":["date","type","location"],"properties":{"date":{"type":"string","example":"2026-09-01","description":"YYYY-MM-DD, or a common spreadsheet date; \"week of 2026-09-01\" for week precision"},"time":{"type":"string","example":"14:30","description":"optional; only the six-hour band (overnight, morning, afternoon, evening) is kept"},"type":{"type":"string","example":"theft","description":"a taxonomy key, its label, or a plain word: theft, shoplifting, mischief, vandalism, graffiti, break in, assault, robbery, trespass, loitering, disturbance, encampment, weapons, drugs, needles, arson, other"},"location":{"type":"string","example":"200 block Queen Street East","description":"a civic address, an intersection (\"Queen St E & Bruce St\"), or a hundred-block"},"notes":{"type":"string","description":"private, never published"},"ref":{"type":"string","description":"the sender's own id; private; a row with a ref already on file is skipped"},"place":{"type":"string","example":"retail","description":"optional kind of place: retail, restaurant_bar, other_business, residence_single, residence_multi_unit, vehicle, street, parking, park, transit, school, hospital, shelter_or_service, police_facility, other"}}},"BatchResult":{"type":"object","properties":{"batchId":{"type":"string"},"received":{"type":"integer"},"accepted":{"type":"integer"},"rejected":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"reason":{"type":"string"}}}},"blocks":{"type":"integer","description":"distinct blocks the accepted rows landed on"}}},"AuditBody":{"type":"object","description":"A block walk: the five-minute condition checklist. Give blockId (from /streets/{key}/blocks) or a location phrase. One per block per auditor per day; a second submission corrects the first.","properties":{"blockId":{"type":"string"},"location":{"type":"string","example":"200 block Queen Street East"},"auditedOn":{"type":"string","format":"date","description":"defaults to today; at most 30 days ago"},"boardedStorefronts":{"type":"integer","minimum":0},"vacantUnits":{"type":"integer","minimum":0},"graffiti":{"type":"integer","enum":[0,1,2]},"needlesOrParaphernalia":{"type":"integer","enum":[0,1,2]},"brokenGlassOrDamage":{"type":"integer","enum":[0,1,2]},"lightingOut":{"type":"integer","minimum":0},"camerasVisible":{"type":"integer","minimum":0},"encampmentPresent":{"type":"boolean"},"notes":{"type":"string","maxLength":2000,"description":"private"}}},"Cron":{"type":"object","description":"Nightly job heartbeat; stale means the public rollups may be behind.","properties":{"lastCompletedAt":{"type":"string","nullable":true},"stale":{"type":"boolean"},"staleAfterHours":{"type":"integer"}}},"Contributors":{"type":"object","description":"Coverage indicator: distinct first-party contributors (businesses with a counted report, partner feeds with rows) on the block in the window, as a bucket. Never who. 3+ is the k at which costs and measures appear.","properties":{"blockId":{"type":"string"},"window":{"type":"string","enum":["30d","90d","365d"]},"contributors":{"type":"string","enum":["0","1","2","3+"]},"k":{"type":"integer","example":3},"note":{"type":"string","example":"Costs and measures appear once three businesses have reported."}}},"ReportBody":{"type":"object","description":"A business or resident report about the reporter's own premises. Everything but the type and date on the hundred-block is private.","required":["occurredOn","type"],"properties":{"occurredOn":{"type":"string","format":"date"},"type":{"type":"string","description":"taxonomy key"},"description":{"type":"string","maxLength":2000,"description":"private"},"repairCostCad":{"type":"number"},"hoursLost":{"type":"number"},"policeReported":{"type":"boolean"},"policeFileNumber":{"type":"string","description":"private"},"timeBand":{"type":"string","enum":["overnight","morning","afternoon","evening"]},"entryMethod":{"type":"string","enum":["forced","smashed_glass","unlocked_or_unforced","security_defeated","attempted_only","not_applicable"]},"stolenValueCad":{"type":"number"},"policeAttended":{"type":"boolean"},"policeResponseBand":{"type":"string"},"insuranceClaim":{"type":"string"},"staffSafetyIncident":{"type":"boolean"},"propertyRecovered":{"type":"boolean"},"priorIncident12m":{"type":"boolean"}}},"QuickFill":{"type":"object","description":"What the quick reader made of a sentence. status ok carries the form fields to confirm; ambiguous carries the one question to answer. Nothing is recorded by this call.","properties":{"status":{"type":"string","enum":["ok","ambiguous"]},"fields":{"$ref":"#/components/schemas/ReportBody"},"question":{"type":"string"},"confidence":{"type":"number"},"redacted":{"type":"boolean","description":"identifying details were removed from the private note"}}},"Benchmark":{"type":"object","description":"A contributor's block against its zone and the city over 90 days, from public numbers only: published incidents (minus takedowns) per hundred-block on the record, and the block's k-suppressed business rollup. Nothing about any other business.","properties":{"windowDays":{"type":"integer","example":90},"block":{"type":"object","properties":{"id":{"type":"string"},"display":{"type":"string"},"zone":{"type":"string","nullable":true},"incidents":{"type":"integer"},"arrests":{"type":"integer"},"charges":{"type":"integer"},"outcomes":{"type":"integer"},"byType":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer"}}}},"businessReports":{"$ref":"#/components/schemas/BusinessReportRollup"}}},"zone":{"type":"object","nullable":true,"properties":{"key":{"type":"string"},"blocks":{"type":"integer"},"incidents":{"type":"integer"},"perBlock":{"type":"number"}}},"city":{"type":"object","properties":{"blocks":{"type":"integer"},"incidents":{"type":"integer"},"perBlock":{"type":"number"}}}}},"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"}}}}},"paths":{"/v1/cities":{"get":{"summary":"Cities","responses":{"200":{"description":"OK"}}}},"/v1/cities/{city}":{"get":{"summary":"One city: name, province, time zone, zones with labels, windows, defaults, data freshness","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"province":{"type":"string"},"timezone":{"type":"string"},"zones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}}}},"windows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}}}},"defaultWindow":{"type":"string"},"defaultZone":{"type":"string"},"dataThrough":{"type":"string","nullable":true}}}}}},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/status":{"get":{"summary":"Data freshness, records held back (discarded by the rules), nightly-cron heartbeat","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dataThrough":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"recordsHeldBack":{"type":"integer"},"recordsUnderReview":{"type":"integer","deprecated":true,"description":"same as recordsHeldBack"},"cron":{"$ref":"#/components/schemas/Cron"}}}}}}}}},"/v1/cities/{city}/summary":{"get":{"summary":"Funnel for a window and zone","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"window","in":"query","schema":{"type":"string","enum":["30d","90d","365d"],"default":"90d"}},{"name":"zone","in":"query","description":"One of the city's zones (GET /v1/cities/{city} lists them) or \"city\" for the whole city.","schema":{"type":"string","enum":["downtown","west_end","city"],"default":"city"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"funnel":{"$ref":"#/components/schemas/Funnel"},"councilActions":{"type":"integer"},"businessesReporting":{"type":"integer"},"recordsHeldBack":{"type":"integer"},"recordsUnderReview":{"type":"integer","deprecated":true}}}}}},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cities/{city}/streets":{"get":{"summary":"Street names from the city gazetteer (no counts)","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cities/{city}/streets/{key}/blocks":{"get":{"summary":"Every hundred-block of one street (OpenStreetMap address points plus blocks the ledger has seen), no counts; for block pickers","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","example":"queen-st-e"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Unknown city or street"}}}},"/v1/cities/{city}/trend":{"get":{"summary":"Trend series: monthly from the nightly rollups (months, groupBy), or live for a window and zone (day/week/month buckets to match the summary beside it)","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"months","in":"query","schema":{"type":"integer","default":12,"minimum":1,"maximum":60}},{"name":"groupBy","in":"query","schema":{"type":"string","enum":["type"]}},{"name":"window","in":"query","description":"when present the series is computed live over this window (and zone) instead of the rollups","schema":{"type":"string","enum":["30d","90d","365d"]}},{"name":"zone","in":"query","description":"One of the city's zones (GET /v1/cities/{city} lists them) or \"city\" for the whole city.","schema":{"type":"string","enum":["downtown","west_end","city"],"default":"city"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cities/{city}/blocks":{"get":{"summary":"Blocks ranked by incidents, with 8-week counts","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"window","in":"query","schema":{"type":"string","enum":["30d","90d","365d"],"default":"90d"}},{"name":"zone","in":"query","description":"One of the city's zones (GET /v1/cities/{city} lists them) or \"city\" for the whole city.","schema":{"type":"string","enum":["downtown","west_end","city"],"default":"city"}},{"name":"street","in":"query","description":"street key from /streets","schema":{"type":"string","maxLength":80}}],"responses":{"200":{"description":"OK"},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cities/{city}/incidents":{"get":{"summary":"Published incidents, keyset-paginated by (occurredOn desc, id desc)","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"window","in":"query","schema":{"type":"string","enum":["30d","90d","365d"],"default":"90d"}},{"name":"zone","in":"query","description":"One of the city's zones (GET /v1/cities/{city} lists them) or \"city\" for the whole city.","schema":{"type":"string","enum":["downtown","west_end","city"],"default":"city"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"block","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"minimum":1,"maximum":200}},{"name":"cursor","in":"query","description":"opaque; pass back the previous response's nextCursor","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"incidents":{"type":"array","items":{"$ref":"#/components/schemas/Incident"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad cursor or parameter"},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cities/{city}/council":{"get":{"summary":"Council items that passed the disorder gate","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"relevance","in":"query","schema":{"type":"string","enum":["downtown_safety","addiction_housing","policing","bylaw","funding","other"]}},{"name":"overdue","in":"query","schema":{"type":"string","enum":["1"]}},{"name":"limit","in":"query","schema":{"type":"integer","default":200,"minimum":1,"maximum":500}}],"responses":{"200":{"description":"OK"},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cities/{city}/official":{"get":{"summary":"Official statistics (Police Services Board monthly reports, StatCan, courthouse)","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"metric","in":"query","description":"one metric or a comma-separated list (up to 60)","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"source","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cities/{city}/reconciliation":{"get":{"summary":"Our counts vs. official figures: monthly against Police Services Board reports (default) or annual against StatCan 35-10-0180-01","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"from","in":"query","schema":{"type":"string","example":"2025-01"}},{"name":"against","in":"query","schema":{"type":"string","enum":["board","statcan"],"default":"board"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cities/{city}/map":{"get":{"summary":"Blocks with published incidents in the window, with map coordinates (OSM address centroids)","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"window","in":"query","schema":{"type":"string","enum":["30d","90d","365d"],"default":"90d"}},{"name":"zone","in":"query","description":"One of the city's zones (GET /v1/cities/{city} lists them) or \"city\" for the whole city.","schema":{"type":"string","enum":["downtown","west_end","city"],"default":"city"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cities/{city}/quality":{"get":{"summary":"Data quality: eval score, records held back (discarded, merged, k-suppressed, takedowns), block share, Board comparison, source health, cron heartbeat","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cities/{city}/rollups.csv":{"get":{"summary":"Public monthly rollups as CSV (attribution licence)","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}}],"responses":{"200":{"description":"text/csv"},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/blocks/{id}":{"get":{"summary":"Block detail: funnel, weekly counts, incidents, k-suppressed business-report, partner-feed and combined rollups, block condition","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"window","in":"query","schema":{"type":"string","enum":["30d","90d","365d"],"default":"90d"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"businessReports":{"$ref":"#/components/schemas/BusinessReportRollup"},"partnerReports":{"$ref":"#/components/schemas/PartnerReportRollup"},"contributedReports":{"$ref":"#/components/schemas/ContributedRollup"},"condition":{"$ref":"#/components/schemas/BlockCondition"}}}}}},"404":{"description":"Unknown block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/openapi.json":{"get":{"summary":"This document","responses":{"200":{"description":"OK"}}}},"/v1/incidents/{id}":{"get":{"summary":"One published incident","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/v1/partners/{token}":{"get":{"summary":"Partner feed: the partner's own deliveries (counts and per-row reasons), totals and block walks. Private to the token holder; never cached","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK (private, no-store)"},"404":{"description":"Unknown feed token"}}}},"/v1/partners/{token}/upload":{"post":{"summary":"Upload a CSV, TSV or .xlsx of incident rows (multipart field \"file\", or the file as the body). Rows publish at once under the automated guards; duplicates are skipped","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}},"text/csv":{"schema":{"type":"string"}}}},"responses":{"201":{"description":"Ingested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"404":{"description":"Unknown feed token"},"409":{"description":"Feed paused"},"413":{"description":"File too large (10 MB)"},"422":{"description":"File not readable"},"429":{"description":"More than 30 deliveries in an hour"}}}},"/v1/partners/{token}/incidents":{"post":{"summary":"Post incident rows as JSON: an array of FeedRow, or { \"rows\": [...] }. At most 2,000 rows per call","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/FeedRow"}}}}}}},"responses":{"201":{"description":"Ingested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"400":{"description":"Not JSON rows"},"404":{"description":"Unknown feed token"},"409":{"description":"Feed paused"},"429":{"description":"More than 30 deliveries in an hour"}}}},"/v1/partners/{token}/audits":{"post":{"summary":"A block walk by the partner (auditor kind partner)","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditBody"}}}},"responses":{"200":{"description":"Updated (same block, same day)"},"201":{"description":"Created"},"404":{"description":"Unknown feed token or block"},"422":{"description":"Block not recognized"}}}},"/v1/contributions/blocks/{id}":{"get":{"summary":"Coverage indicator for one block: distinct contributors in the window as 0 / 1 / 2 / 3+ (never who). An unknown block answers 0 like an empty one","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"window","in":"query","schema":{"type":"string","enum":["30d","90d","365d"],"default":"90d"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contributors"}}}}}}},"/v1/contributions/cities/{city}/blocks":{"get":{"summary":"Coverage indicator for every block with at least one contributor in the window: { blockId: bucket }; a block not listed is 0","parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"window","in":"query","schema":{"type":"string","enum":["30d","90d","365d"],"default":"90d"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"city":{"type":"string"},"window":{"type":"string"},"k":{"type":"integer"},"note":{"type":"string"},"blocks":{"type":"object","additionalProperties":{"type":"string","enum":["0","1","2","3+"]}}}}}}},"404":{"description":"Unknown city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/intake/quick":{"post":{"summary":"Quick report on the web: one sentence in, the form's fields out (or one question). Records nothing; the reporter confirms with POST /v1/intake/reports?channel=quick_web. At most 30 a day per contributor; read by the same model, under the same daily spend cap, as the pipeline","security":[{"intake":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":1500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickFill"}}}},"401":{"description":"Link expired or invalid"},"409":{"description":"Register the business first"},"429":{"description":"Too many quick reports today"},"503":{"description":"The reader is unavailable (cap hit, provider down); the form still works"}}}},"/v1/intake/reports":{"post":{"summary":"A report about the reporter's own premises; counts on the block at once behind automated guards (confirmed email, date within three years and not in the future, at most ten per business per 30 days). The first report records acceptance of the contributor terms. ?channel=quick_web marks a report pre-filled by the quick reader","security":[{"intake":[]}],"parameters":[{"name":"channel","in":"query","schema":{"type":"string","enum":["form","quick_web"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportBody"}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Bad request or implausible date"},"401":{"description":"Link expired or invalid"},"409":{"description":"Register the business first"},"429":{"description":"Report ceiling reached"}}}},"/v1/intake/reports/{id}":{"put":{"summary":"Correct one of the reporter's own reports (the one-tap link in every quick-report receipt lands here); the fields are replaced, the change audited by field name only","security":[{"intake":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportBody"}}}},"responses":{"200":{"description":"OK"},"404":{"description":"Not the reporter's report"},"409":{"description":"The report is closed (withdrawn)"}}}},"/v1/intake/block-alert":{"post":{"summary":"Contributor benefit: switch the nightly block alert on or off for the reporter's block. The address is already confirmed, so the click is the consent record; every alert has a one-click unsubscribe. 403 until one report or one block walk in the last twelve months","security":[{"intake":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["on"],"properties":{"on":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"403":{"description":"Report once to unlock"},"409":{"description":"Register the business first"}}}},"/v1/intake/export.csv":{"get":{"summary":"Contributor benefit: the reporter's own incident log as CSV (their record, not verified by the operator). 403 until they are a contributor","security":[{"intake":[]}],"responses":{"200":{"description":"text/csv (private, no-store)"},"403":{"description":"Report once to unlock"}}}},"/v1/intake/benchmark":{"get":{"summary":"Contributor benefit: the reporter's block against its zone and the city over 90 days, from public numbers only. 403 until they are a contributor","security":[{"intake":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Benchmark"}}}},"403":{"description":"Report once to unlock"}}}},"/v1/intake/audits":{"post":{"summary":"A block walk by a signed-in business or resident (the intake session token)","security":[{"intake":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditBody"}}}},"responses":{"200":{"description":"Updated (same block, same day)"},"201":{"description":"Created"},"401":{"description":"Link expired or invalid"},"422":{"description":"Block not recognized"}}}},"/v1/licensed/resolve":{"get":{"summary":"Address → block","security":[{"apiKey":[]}],"parameters":[{"name":"city","in":"query","schema":{"type":"string","default":"ssm"}},{"name":"address","in":"query","required":true,"schema":{"type":"string","example":"123 Queen Street East"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not resolved"}}}},"/v1/licensed/blocks/{id}/history":{"get":{"summary":"Weekly rollups for a block","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","example":"2024-01"}},{"name":"type","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/v1/licensed/blocks/{id}/mitigations":{"get":{"summary":"Verified security measures by kind (suppressed below 3 businesses)","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/v1/licensed/cities/{city}/export":{"get":{"summary":"Published incidents export (CSV or JSON); records with any event from a source whose licence is not in good standing are left out","security":[{"apiKey":[]}],"parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string","example":"ssm"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"format","in":"query","schema":{"type":"string","enum":["csv","json"],"default":"csv"}}],"responses":{"200":{"description":"CSV or JSON"}}}},"/v1/licensed/index/{blockId}":{"get":{"summary":"Disorder index v0 for a block (versioned)","security":[{"apiKey":[]}],"parameters":[{"name":"blockId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/v1/licensed/corrections":{"get":{"summary":"Corrections feed (records withdrawn since a timestamp)","security":[{"apiKey":[]}],"parameters":[{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK"}}}}}}