Employers

Top OSHA standards cited

Per-employer rollup of OSHA standards cited.

For a given employer, aggregate every citation across every inspection by the CFR standard column and surface the most-cited standards. Customers see the OSHA aggregate tile ("47 violations") but the pattern -- "23 of those 47 were under CFR 1910.147 Lockout/Tagout" -- is the asymmetric add. Per-inspection drilldown is already available via /v1/inspections/{activity_nr}/violations; this endpoint is the rollup that's otherwise invisible to a customer scanning the employer page.

Joins violation_detail (per-citation) to inspection_detail (per-inspection) on activity_nr so we can filter by employer_id. GROUP BY standard. Per-standard aggregates returned:

  • citation_count
  • total_penalty (sum of current_penalty, falling back to initial_penalty when current is NULL)
  • last_citation_date (MAX of issuance_date)
  • first_citation_date (MIN of issuance_date)
  • inspection_count (DISTINCT activity_nr)

Ordered: citation_count DESC, then total_penalty DESC, then last_citation_date DESC. The most-frequent and highest-dollar standards land on page 1 of any paginated view.

NOT metered as a separate lookup beyond the standard IP throttle -- this is a roll-up over data the customer already has the right to see, not a new data slice.

get/v1/employers/{employer_id}/osha-standards

Path parameters

employer_idstring required

Query parameters

limitinteger

Headers

X-Api-Keystring

Response

Successful Response

{"stackTrail":"paths:/v1/employers/{employer_id}/osha-standards:get:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}