Skip to main content

Endpoint

GET /businesses/{id} Returns an HTML page with full details for a single business, including its most recent risk evaluation and factor breakdown (if one exists).

Path parameters

id
integer
required
The unique integer ID of the business.

Response

Returns the business_detail.html page. The template context includes the following fields.

Business fields

business.id
integer
Unique identifier for the business.
business.name
string
Business name.
business.industry
string
Industry category. null if not set.
business.country
string
Country name. null if not set.
business.created_at
datetime
UTC timestamp of when the business was created.

Evaluation fields

Present when at least one risk evaluation has been run for the business.
evaluation.risk_score
float
Final computed risk score, between 0 and 100.
evaluation.risk_level
string
Risk classification: low (below 25), medium (25–50), high (50–75), or critical (75 and above).
evaluation.evaluated_at
datetime
UTC timestamp of when the evaluation was run.
factors
object
Parsed JSON breakdown of score components.

Error responses

StatusDescription
404 Not FoundNo business exists with the given id.
422 Unprocessable EntityThe id is not a valid integer.

Example

curl http://localhost:8000/businesses/1
This endpoint returns the most recent evaluation only. To retrieve the full history of evaluations for a business, use the risk history endpoint.

Build docs developers (and LLMs) love