DDDailyDog/ API docs

Reference

Glossary & response objects

The terms you'll meet in every response, then each object the API returns, field by field. Fields marked * are always present (possibly nullwhen the type allows); others may be omitted. New fields can appear at any time — ignore what you don't recognize.

Terms

CAMIS
The Health Department's permit number for a food-service establishment — the `camis` id on every restaurant endpoint. Numeric string.
BBL
Borough-Block-Lot: the 10-digit tax-lot id (borough 1–5, 5-digit block, 4-digit lot) — the `bbl` id on property endpoints. 1 Manhattan, 2 Bronx, 3 Brooklyn, 4 Queens, 5 Staten Island.
Slug
A contractor's URL-safe id derived from the name the city dockets it under. Docket spellings fold to one canonical slug per company; get slugs from `/v1/contractors/search`.
Grade
The posted letter: A (score 0–13), B (14–27), C (28+); Z and P mean grade pending, N not yet graded. Scores are penalty points — lower is better.
riskLevel / riskScore
DailyDog's 0–100 score bucketed LOW · MODERATE · HIGH · SEVERE — the same scoring as dailydog.ai reports. The facts are the city's; the weighting is ours.
Open violation
A city record without a closing disposition (not cured, dismissed, or paid/resolved) at the time of the last sync.
ECB / OATH
Environmental Control Board summonses, adjudicated by the Office of Administrative Trials and Hearings. Carries the hearing result, penalty imposed, and balance due.
Defaulted hearing
The respondent didn't appear; the penalty was imposed in full. Often reopenable within a window — see the reopen fields on contractor tickets.
Cents
All money is integer cents: `finesDueCents: 6650000` is $66,500.00. Divide by 100 for display.
Dates
ISO-8601. Day-precision fields are `YYYY-MM-DD`; timestamps carry a time and `Z`.
Deadline status
ok · due_soon · overdue · action_needed · unverifiable. `unverifiable` means the city publishes no record to check — never read it as compliant.
dd_live_ / dd_test_
Key modes. Live keys read city records; test keys answer from the deterministic fixture city with identical envelopes.

Response objects

RestaurantSummary

Returned by GET /v1/restaurants/search, GET /v1/restaurants, GET /v1/restaurants/nearby

FieldTypeDescription
camis *stringDOHMH permit number — the establishment's id.
name *stringDoing-business-as name.
address *stringStreet address (borough is its own field).
borough *stringBorough.
zipstring | nullZIP code.
cuisinestring | nullCuisine description.
gradestring | nullPosted grade: A|B|C|Z|P|N (Z/P = pending, N = not yet graded).
scoreinteger | nullLatest inspection score — LOWER is better; 0–13 is the A band.
closed *booleanCurrently marked closed by the Health Department.
riskLevel *LOW | MODERATE | HIGH | SEVERELOW | MODERATE | HIGH | SEVERE.
riskScore *integer0–100, higher is worse.
lastInspectedAtstring | nullMost recent inspection.
latitudenumber | null
longitudenumber | null
openViolations *integerItems open right now (latest-cycle citations).

Violation

Returned by GET /v1/restaurants/{camis}/violations

FieldTypeDescription
codestring | nullDOHMH violation code.
description *stringWhat was cited.
critical *booleanCritical citations drive the score and re-inspections.
inspectedAt *stringInspection date.
inspectionTypestring | nullInspection program/type.
category *vermin | food_temp | hygiene | facility | admin | otherContract category.

Inspection

Returned by GET /v1/restaurants/{camis}/inspections

FieldTypeDescription
inspectedAt *stringVisit date.
typestring | nullInspection program/type.
scoreinteger | nullScore issued at this visit (lower is better).
gradestring | nullGrade issued at this visit, if any.
actionstring | nullThe Health Department's action line.
closedRestaurant *booleanThis visit closed the establishment.
violations *array<Violation>

VerminReport

FieldTypeDescription
mice *integerMouse-evidence citations, last 3 years.
rats *integerRat-evidence citations, last 3 years.
roaches *integerRoach citations, last 3 years.
flies *integerFly citations, last 3 years.
other *integerOther live-animal citations, last 3 years.
conducive *integer'Conditions conducive to vermin' citations — the warning sign.
lastSightedAtstring | nullMost recent live-vermin citation.
weightedobjectRecency-weighted sightings (same 3-year window): each citation counts 0.5^(ageDays/365) — a 12-month half-life, so a 3-week-old finding weighs ~1.0 and a 3-year-old ~0.125. One decimal. Use these when a 'how bad is it NOW' number is wanted; the flat counts above remain for compatibility.
↳ mice *numberRecency-weighted mouse citations.
↳ rats *numberRecency-weighted rat citations.
↳ roaches *numberRecency-weighted roach citations.
↳ flies *numberRecency-weighted fly citations.
↳ other *numberRecency-weighted other live-animal citations.
↳ conducive *numberRecency-weighted conducive-conditions citations.

SanitaryReport

The food-safety story only — computed from health-inspection records; enforcement and administrative records are excluded. Food categories: vermin, food_temp, hygiene, facility.

FieldTypeDescription
latestCycleScoreinteger | nullMost recent scored inspection (lower is better); null if never scored.
latestInitialScoreinteger | nullMost recent scored INITIAL inspection — the steady-state signal (re-inspections happen after a cleanup and score flatteringly).
worstScore36mointeger | nullWorst (highest) score in the last 36 months.
criticalFood24mo *integerCritical food-category violations in the last 24 months.
openFoodViolations *integerFood-category items cited at the most recent visit.
closures36mo *integerHealth Department closures in the last 36 months.
weightedobjectRecency-weighted variants of the flat counts (same windows, 12-month half-life: 0.5^(ageDays/365)). Recent findings dominate; three-year-old history fades to ~12.5%. `worstScoreWeight` is the recency weight (0–1) of the inspection behind `worstScore36mo` — multiply the two to age the worst-score story; null when there is no scored history.
↳ criticalFood *numberRecency-weighted critical food-category violations (24-month window).
↳ closures *numberRecency-weighted closures (36-month window).
↳ worstScoreWeightnumber | nullRecency weight (0–1) of the worst score's most recent occurrence.
ownerResponseSignalstring | null'documented_fixes' when the operator has uploaded proof of correcting one or more currently-open violations; null otherwise. Owner-submitted and UNVERIFIED — a transparent response indicator, pending re-inspection. It NEVER changes the grade, score, or risk. See the `remediation` object for the counts, and render it as information (e.g. 'Owner has documented fixes for N of M open items — pending re-inspection').

RestaurantStats

FieldTypeDescription
openViolations *integerItems open right now.
totalViolations *integerCitations + summonses on record.
criticalViolations *integerCritical citations across the history.
inspectionCount *integerInspection visits on record.
closureCount *integerTimes the Health Department closed it.
oathSummonses *integerHearing summonses on record.
finesImposedCents *integerPenalties imposed across the docket. Integer cents.
finesDueCents *integerPenalties currently due. Integer cents.
defaultedHearings *integerMissed hearings that became default judgments.

FullRestaurantProfile

Returned by GET /v1/restaurants/{camis}, POST /v1/restaurants/batch

FieldTypeDescription
restaurant *RestaurantSummary
gradeDate *string | nullWhen the posted grade was issued.
risk *object
↳ score *integer0–100, higher is worse.
↳ level *LOW | MODERATE | HIGH | SEVERELOW | MODERATE | HIGH | SEVERE.
↳ factors *array<object>
vermin *VerminReport
sanitary *SanitaryReportThe food-safety story only — computed from health-inspection records; enforcement and administrative records are excluded. Food categories: vermin, food_temp, hygiene, facility.
stats *RestaurantStats
community *CommunityBlockCommunity-report rollup for the establishment. `counts` are over the non-hidden set; `scoreAdjustment` is the capped, decaying dock in [-8, 0], surfaced as its own labeled line (never silently blended). Praise never adds points.
remediation *object | nullThe owner-response signal, or null when nothing is documented against an open violation. Owner-submitted proof of fix, UNVERIFIED and pending re-inspection — presentation only, never a score change.
↳ openViolationsintegerViolations open right now — the set the signal is measured against.
↳ documentedOpenViolationsintegerOpen violations with at least one owner-uploaded document.
↳ categoriesarray<vermin | food_temp | hygiene | facility | admin | other>Distinct categories among the documented open violations.
↳ lastDocumentedAtstring | nullMost recent upload date among documented open violations.

CommunityBlock

Community-report rollup for the establishment. `counts` are over the non-hidden set; `scoreAdjustment` is the capped, decaying dock in [-8, 0], surfaced as its own labeled line (never silently blended). Praise never adds points.

FieldTypeDescription
counts *object
↳ pest *integerNon-hidden pest reports.
↳ food_poisoning *integerNon-hidden food-poisoning reports.
↳ sanitation_other *integerNon-hidden other-sanitation reports.
↳ praise_taste *integerTaste praise (never affects score).
↳ praise_clean *integerCleanliness praise (never affects score).
lastReportAt *string | nullMost recent non-hidden report date.
scoreAdjustment *integerScore points to add, an integer in [-8, 0]. Negative = docked, 0 = none.

CommunityAuthor

FieldTypeDescription
displayName *stringClaimed username, or the stable generated fun default.
avatarId *string | nullOpaque avatar id for GET /v1/profiles/avatars/{id}; null → render a monogram.

CommunityReport

Returned by GET /v1/restaurants/{camis}/reports, POST /v1/restaurants/{camis}/reports

FieldTypeDescription
id *stringReport id.
kind *pest | food_poisoning | sanitation_other | praise_taste | praise_cleanReport kind.
pestSubtypestring | nullFor pest reports: rats | mice | roaches | flies | other; null otherwise.
body *stringThe reporter's description (20–500 chars, shown verbatim).
createdAt *stringReport date (day precision on public surfaces).
photoIds *array<string>
author *CommunityAuthor

OwnCommunityReport

Returned by GET /v1/profile/reports

FieldTypeDescription
id *stringReport id.
kind *pest | food_poisoning | sanitation_other | praise_taste | praise_cleanReport kind.
pestSubtypestring | nullFor pest reports: rats | mice | roaches | flies | other; null otherwise.
body *stringThe reporter's description (20–500 chars, shown verbatim).
createdAt *stringReport date (day precision on public surfaces).
photoIds *array<string>
author *CommunityAuthor
camis *stringThe establishment this report is about.
status *active | disputed | hidden | upheldactive | disputed | upheld | hidden — honest, including hidden.

DeviceProfile

Returned by GET /v1/profile, PATCH /v1/profile, POST /v1/profile/avatar

FieldTypeDescription
username *string | nullClaimed username, or null if never claimed.
funDefault *stringStable generated display name for an unclaimed device.
displayName *stringusername ?? funDefault — what surfaces render.
avatarId *string | nullOpaque avatar id, or null (render a monogram).
createdAt *string | nullISO timestamp the profile row was created, or null.
renamedAt *string | nullISO timestamp of the last username change, or null.
canRenameAt *string | nullISO timestamp: `renamedAt` + 14 days (may already be past — then renaming is allowed now). Null when the device has never renamed.

UsernameAvailability

Returned by GET /v1/profile/username-check

FieldTypeDescription
available *booleanWhether the candidate username can be claimed.
reasonstringWhy not, when unavailable.

CityViolation

Returned by GET /v1/violations

FieldTypeDescription
codestring | nullDOHMH violation code.
description *stringWhat was cited.
critical *booleanCritical citations drive the score and re-inspections.
inspectedAt *stringInspection date.
inspectionTypestring | nullInspection program/type.
category *vermin | food_temp | hygiene | facility | admin | otherContract category.
camis *stringEstablishment id.
restaurantName *stringEstablishment name.
address *stringStreet address.
borough *stringBorough.
latitude *number | nullEstablishment latitude (null when the record lacks coordinates).
longitude *number | nullEstablishment longitude.
zip *string | nullZIP code.

CityInspection

Returned by GET /v1/inspections

FieldTypeDescription
camis *stringEstablishment id.
name *stringEstablishment name.
addressstringStreet address.
borough *stringBorough.
inspectedAt *stringVisit date.
typestring | nullInspection program/type.
scoreinteger | nullScore issued (lower is better).
gradestring | nullGrade issued, if any.
closedRestaurant *booleanThis visit closed the establishment.

ViolationCodeMeta

Returned by GET /v1/meta/violation-codes

FieldTypeDescription
code *stringDOHMH violation code.
description *stringWhat the code means.
category *vermin | food_temp | hygiene | facility | admin | otherContract category.

RestaurantStatsAggregate

Returned by GET /v1/stats/restaurants

FieldTypeDescription
establishments *integerDistinct establishments on record.
byGrade *objectDistinct establishments graded that letter in the last 12 months.
byBorough *objectDistinct establishments per borough.
violationsLast30Days *integerCitations recorded in the last 30 days.

PropertySearchHit

Returned by GET /v1/properties/search

FieldTypeDescription
bbl *string10-digit borough-block-lot.
address *stringStreet line.
borough *stringBorough.
slug *stringPublic page: dailydog.ai/property/<slug>.

PropertyProfile

Returned by GET /v1/properties/{bbl}, POST /v1/properties/batch

FieldTypeDescription
bbl *string10-digit borough-block-lot.
address *stringAddress on record.
borough *stringBorough.
riskLevel *LOW | MODERATE | HIGH | SEVERELOW | MODERATE | HIGH | SEVERE.
riskScore *integer0–100, higher is worse.
openViolations *integerViolations open right now.
totalRecords *integerRecords across every city system swept.
finesImposedCents *integerPenalties imposed. Integer cents.
finesDueCents *integerPenalties currently due — judgment exposure. Integer cents.
defaultedHearings *integerMissed hearings that became default judgments.
agencies *array<object>
↳ agency *stringEnforcement system.
↳ openCount *integerOpen records there.

PropertyViolation

Returned by GET /v1/properties/{bbl}/violations

FieldTypeDescription
identifier *stringViolation/summons number — matches the city's paperwork.
agency *stringEnforcement system (ECB, DOB…).
recordTypestringRecord class.
status *stringCurrent status line.
description *stringWhat was cited.
isOpen *booleanStill demands action.
issuedAtstring | nullIssue date.
statusAtstring | nullLast status/hearing date.
penaltyImposedCents *integerPenalty imposed. Integer cents.
penaltyDueCents *integerBalance currently due. Integer cents.

PropertyPermit

Returned by GET /v1/properties/{bbl}/permits

FieldTypeDescription
identifier *stringJob/permit number.
agency *stringDOB | DOB_NOW.
recordTypestringFiling class.
status *stringCurrent status line.
description *stringScope of work.
isOpen *booleanStill open (not signed off/closed).
issuedAtstring | nullIssue/filing date.
expiresAtstring | nullPermit expiration.
statusAtstring | nullLast status date.

Deadline

Returned by GET /v1/properties/{bbl}/deadlines

FieldTypeDescription
kind *stringStable obligation key (facade_filing, benchmarking, elevator_cat1…).
label *stringHuman label.
status *ok | due_soon | overdue | action_needed | unverifiableObligation status.
dueDatestring | nullNext date something is owed.
lastEvidenceAtstring | nullMost recent satisfying filing the city shows.
basis *stringPlain-English rule + citation.
penalty *stringWhat missing it costs.
verifiable *booleanFalse when no public record can confirm compliance — treat as a reminder.
whatToDo *stringThe playbook: what to actually do, and what to have ready.
guideUrlstring | nullStep-by-step guide on dailydog.ai.

ContractorSearchHit

Returned by GET /v1/contractors, GET /v1/contractors/search

FieldTypeDescription
slug *stringCanonical company slug — the id for the profile endpoints.
name *stringCompany name as the city dockets it.
ticketCount *integerSummonses on the docket.
finesDueCents *integerOutstanding balance. Integer cents.
riskLevel *LOW | MODERATE | HIGH | SEVEREBalance-weighted at browse/search level; the profile carries the full assessment.

ContractorProfile

Returned by GET /v1/contractors/{slug}, POST /v1/contractors/batch

FieldTypeDescription
slug *stringCanonical company slug.
name *stringPrimary docket spelling.
riskLevel *LOW | MODERATE | HIGH | SEVEREFull reputation assessment.
tickets *integerSummonses across every docket spelling.
openTickets *integerTickets still demanding action (money due or hearing ahead).
finesImposedCents *integerPenalties imposed. Integer cents.
finesDueCents *integerOutstanding balance. Integer cents.
defaultedHearings *integerUnpaid default judgments.
reopenableSavingsMinCents *integerFloor: default inflation a granted new hearing erases (live 75-day windows only). Integer cents.
reopenableSavingsMaxCents *integerCeiling: everything at stake in live windows if charges dismiss. Integer cents.

ContractorTicket

Returned by GET /v1/contractors/{slug}/tickets

FieldTypeDescription
ticket *string10-character summons number — matches the city's paperwork.
charge *stringLead charge description.
issuedstring | nullViolation date.
hearingDatestring | nullHearing date (past or scheduled).
hearingResult *stringThe city's hearing result/status line.
status *open | defaulted | closedopen | defaulted | closed.
dueCents *integerBalance due on this ticket. Integer cents.
imposedCents *integerPenalty imposed. Integer cents.
soughtCents *integerScheduled amount sought — what losing at a normal hearing costs. Integer cents.
defaulted *booleanA missed hearing turned this into a default judgment.
reopenableUntilstring | nullLast day a new-hearing request is auto-granted; null when no live window.

KeyInfo

Returned by GET /v1/me

FieldTypeDescription
name *stringKey name.
tier *stringstandard | unlimited.
mode *live | testlive | test — test keys answer from the fixture city.
createdAt *stringISO timestamp.
usage *object
↳ today *integerRequests since midnight UTC.
↳ last30Days *integerRequests over 30 days.
↳ dailyLimit *integer | nullYour commissioned daily limit; null = unlimited.