Skip to main content
GET /businesses/{id}/risk-history

Path parameters

id
integer
required
The unique identifier of the business whose evaluation history you want to retrieve.

What happens

The server fetches the business record by id, then returns all of its RiskEvaluation records ordered by evaluated_at descending — most recent evaluation first.

Response

Returns an HTML page rendered from risk_history.html listing every evaluation for the business.

Evaluation fields

evaluated_at
DateTime
The UTC timestamp when the evaluation was created.
risk_score
Float
The final risk score, from 0.0 to 100.0.
risk_level
String
The risk classification: low, medium, high, or critical.
factors
Object
Parsed JSON object containing the scoring breakdown.

Example

curl http://localhost:8000/businesses/1/risk-history

Error responses

StatusDescription
404 Not FoundNo business exists with the given id.
422 Unprocessable EntityThe id is not a valid integer.
Seed data includes 3 evaluations per business, so every business has a baseline history on a fresh install.
New evaluations from POST /businesses/{id}/evaluate are appended to this history automatically. Refresh or re-request this endpoint to see them.

Build docs developers (and LLMs) love