Fetch OSHA Hours as a csv file or in json format.

OSHA hours are sorted newest to oldest. You can filter by establishments (establishment_ids), year (year) and by months (months.

This method will return up to 1000 OSHA Hours at a time and you can using paging to fetch additional items.

The paging field in the response includes total which contains the total number of responses available and last_page which is the highest page number which would contain results.

When the format is set to csv then the paging information will be passed down via these headers: kpaehs-total-results and kpaehs-last-page.


Parameters

Your request data may contain the following parameters. GET or POST the object (as JSON) to https://api.kpaehs.com/v1/osha-hours.list.

Parameter TypeScript Example Required Description
token string "YOUR_TOKEN" Required Your API Token
pretty boolean true Optional true means the response json will include white space for readability. Default is false.
establishment_ids number[] [1024] Optional The id of the establishment(s) to filter hours by.
year number 2026 Optional The year to filter hours by.
months number[] [9] Optional The month(s) to filter hours by.
page number 1 Optional The page of OSHA hours to return. Defaults to 1. The response field paging.last_page tells you what the last valid page number is.
limit number 100 Optional The maximum number of responses to return. Max 1000. Defaults to 1000. Use page to fetch additional responses.
format string "csv" Optional Choose whether the response should be in `json` or `csv` format. `json` is the default.

Example Request


Example Response

"Year","Month","Establishment","Hours","FieldOfficeCode","LineOfBusinessCode","Company"
"2026","10","Establishment C","166250","HSC","AS","A&B Services"
"2026","9","Establishment E","192750","","",""
"2026","9","Establishment E","221750","DAC","EL","A&B Services"
"2026","9","Establishment A","158500","DAC","CN","Emerson Finishing"
"2026","8","Establishment A","206250","DAC","AS","A&B Services"

Errors

If an error occurs, the response JSON will have ok set to false:

{
  "ok": false,
  "error": "token_invalid",
  "description": "The token `YOUR_TOKEN` was not found."
}

The error field will contain one of the following error identifiers and there may also be a description field with a more detailed explanation:

Identifier Description
api_method_not_found The requested url did not match any KPA Flex API method.
request_method_invalid The requested method was not GET or POST.
request_data_invalid The request did not include a valid JSON request object.
rate_limit_exceeded This token is exceeding its request limit.
token_missing The request did not include a token.
token_invalid The request token was invalid.
token_inactive The request token was has been deactivated.
token_permission The request token does not have write permission.
account_inactive The request token was for an account that is not active.
parameter_unexpected The request data included a parameter that is not supported.
parameter_missing The request data failed to include a parameter which was required.
parameter_invalid The request data included a parameter which had a value that is not allowed.
server_error The server encountered an internal error.
content_not_found The requested content was not found.