> ## Documentation Index
> Fetch the complete documentation index at: https://docs.effectiveai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# List OSHA case details

> OSHA ITA case detail from Forms 300 and 301: one row per injury or illness, with the job, outcome and the employer’s own narrative. OSHA’s rows as published, under OSHA’s own column names in camelCase. Each row also carries the employerId and siteId Effective matched it to (null if unmatched) and the OSHA file it came from. Newest first. To page, repeat the same filters and limit with cursor set to nextCursor. Read one with GET /insurance/osha/case-details/{id}. Needs the OSHA dataset enabled for your organization. Read-only; private, no-store. 



## OpenAPI

````yaml /openapi.json get /insurance/osha/case-details
openapi: 3.0.3
info:
  title: Effective API
  version: 2.0.0
  description: The public Effective REST API. Authenticate using an Effective API key.
servers:
  - url: https://api.effectiveai.app/api/v2
    description: Production
security:
  - bearerAuth: []
paths:
  /insurance/osha/case-details:
    get:
      tags:
        - OSHA
      summary: List OSHA case details
      description: >-
        OSHA ITA case detail from Forms 300 and 301: one row per injury or
        illness, with the job, outcome and the employer’s own narrative. OSHA’s
        rows as published, under OSHA’s own column names in camelCase. Each row
        also carries the employerId and siteId Effective matched it to (null if
        unmatched) and the OSHA file it came from. Newest first. To page, repeat
        the same filters and limit with cursor set to nextCursor. Read one with
        GET /insurance/osha/case-details/{id}. Needs the OSHA dataset enabled
        for your organization. Read-only; private, no-store. 
      operationId: listOshaCaseDetails
      parameters:
        - schema:
            type: string
            pattern: ^emp_[0-9a-f]{20}$
            description: 'Effective employer ID: emp_ followed by 20 hex characters.'
          required: false
          description: 'Effective employer ID: emp_ followed by 20 hex characters.'
          name: employerId
          in: query
        - schema:
            type: string
            pattern: ^site_[0-9a-f]{20}$
            description: 'Effective site ID: site_ followed by 20 hex characters.'
          required: false
          description: 'Effective site ID: site_ followed by 20 hex characters.'
          name: siteId
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 40
            description: OSHA ITA establishment ID.
          required: false
          description: OSHA ITA establishment ID.
          name: establishmentId
          in: query
        - schema:
            type: string
            pattern: ^\d{2}-?\d{7}$
            description: EIN as filed, with or without the dash.
          required: false
          description: EIN as filed, with or without the dash.
          name: ein
          in: query
        - schema:
            type: string
            pattern: ^[A-Za-z]{2}$
            description: Two-letter state code, such as FL.
          required: false
          description: Two-letter state code, such as FL.
          name: state
          in: query
        - schema:
            type: string
            pattern: ^\d{2,6}$
            description: >-
              NAICS code or prefix, 2 to 6 digits. 2381 matches every 2381xx
              code.
          required: false
          description: NAICS code or prefix, 2 to 6 digits. 2381 matches every 2381xx code.
          name: naics
          in: query
        - schema:
            type: string
            pattern: ^\d{4}$
            description: >-
              Filing year (OSHA’s yearFilingFor): the calendar year the cases
              happened in.
          required: false
          description: >-
            Filing year (OSHA’s yearFilingFor): the calendar year the cases
            happened in.
          name: year
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
            description: Maximum number of items to return (1-100).
          required: false
          description: Maximum number of items to return (1-100).
          name: limit
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 8192
            description: >-
              Opaque nextCursor from this operation. Repeat every other query
              parameter unchanged; a cursor from a different query returns
              invalid_cursor.
          required: false
          description: >-
            Opaque nextCursor from this operation. Repeat every other query
            parameter unchanged; a cursor from a different query returns
            invalid_cursor.
          name: cursor
          in: query
      responses:
        '200':
          description: One page of case details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2OshaCaseDetails'
        '400':
          description: >-
            invalid_request for invalid, unknown or repeated inputs;
            invalid_cursor means restart the list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '403':
          description: >-
            dataset_not_enabled: the OSHA dataset is not enabled for this
            organization. Other credential restrictions use forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '404':
          description: 'not_found: no such employer, site or OSHA row.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '500':
          description: Unexpected server failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '503':
          description: A dependency is unavailable; respect Retry-After.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
      security:
        - bearerAuth: []
components:
  schemas:
    V2OshaCaseDetails:
      type: object
      properties:
        caseDetails:
          type: array
          items:
            $ref: '#/components/schemas/V2OshaCaseDetail'
        nextCursor:
          type: string
          nullable: true
          description: Cursor for the next page, or null on the last page.
      required:
        - caseDetails
        - nextCursor
    V2CodedError:
      allOf:
        - $ref: '#/components/schemas/V2Error'
        - type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Stable error code. Clients must tolerate unknown future codes.
            details:
              type: array
              items:
                type: object
                properties:
                  location:
                    type: string
                    enum:
                      - path
                      - query
                      - header
                      - body
                  path:
                    type: array
                    items:
                      type: string
                      maxLength: 64
                    maxItems: 12
                  code:
                    type: string
                    enum:
                      - required
                      - invalid_type
                      - invalid_value
                      - unknown_field
                  message:
                    type: string
                    minLength: 1
                    maxLength: 200
                required:
                  - location
                  - path
                  - code
                  - message
              minItems: 1
              maxItems: 20
              description: Bounded safe validation issues; may omit some invalid fields.
            requestId:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                Existing server correlation for this HTTP attempt, when
                available.
            dataset:
              type: string
              enum:
                - naic
                - osha
              description: Dataset needed for dataset_not_enabled.
            accessUrl:
              type: string
              nullable: true
              format: uri
              description: >-
                Where to add the product to your account, for
                product_access_required.
          required:
            - code
    V2OshaCaseDetail:
      type: object
      properties:
        id:
          type: string
          description: OSHA’s case detail ID.
        establishmentId:
          type: string
          nullable: true
        establishmentName:
          type: string
          nullable: true
        ein:
          type: string
          nullable: true
        companyName:
          type: string
          nullable: true
        streetAddress:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        zipCode:
          type: string
          nullable: true
        naicsCode:
          type: string
          nullable: true
        naicsYear:
          type: number
          nullable: true
        industryDescription:
          type: string
          nullable: true
        establishmentType:
          type: number
          nullable: true
        size:
          type: number
          nullable: true
        annualAverageEmployees:
          type: number
          nullable: true
        totalHoursWorked:
          type: number
          nullable: true
        caseNumber:
          type: string
          nullable: true
        jobDescription:
          type: string
          nullable: true
        socCode:
          type: string
          nullable: true
        socDescription:
          type: string
          nullable: true
        socProbability:
          type: number
          nullable: true
        socReviewed:
          type: string
          nullable: true
        unexpectedNaicsSocCombo:
          type: string
          nullable: true
        dateOfIncident:
          type: string
          nullable: true
        incidentOutcome:
          type: number
          nullable: true
        dafwNumAway:
          type: number
          nullable: true
        djtrNumTr:
          type: number
          nullable: true
        typeOfIncident:
          type: number
          nullable: true
        timeStartedWork:
          type: string
          nullable: true
        timeOfIncident:
          type: string
          nullable: true
        timeUnknown:
          type: number
          nullable: true
        dateOfDeath:
          type: string
          nullable: true
        createdTimestamp:
          type: string
          nullable: true
        yearOfFiling:
          type: number
          nullable: true
        yearFilingFor:
          type: number
          nullable: true
        newIncidentLocation:
          type: string
          nullable: true
        newIncidentDescription:
          type: string
          nullable: true
        newNarBeforeIncident:
          type: string
          nullable: true
        newNarWhatHappened:
          type: string
          nullable: true
        newNarInjuryIllness:
          type: string
          nullable: true
        newNarObjectSubstance:
          type: string
          nullable: true
        natureCodePred:
          type: string
          nullable: true
        natureTitlePred:
          type: string
          nullable: true
        partCodePred:
          type: string
          nullable: true
        partTitlePred:
          type: string
          nullable: true
        eventCodePred:
          type: string
          nullable: true
        eventTitlePred:
          type: string
          nullable: true
        sourceCodePred:
          type: string
          nullable: true
        sourceTitlePred:
          type: string
          nullable: true
        secSourceCodePred:
          type: string
          nullable: true
        secSourceTitlePred:
          type: string
          nullable: true
        employerId:
          type: string
          nullable: true
          pattern: ^emp_[0-9a-f]{20}$
          description: >-
            Employer Effective matched this row to, or null if it could not
            place it.
        siteId:
          type: string
          nullable: true
          pattern: ^site_[0-9a-f]{20}$
          description: Site Effective matched this row to, or null.
        sourceFile:
          $ref: '#/components/schemas/V2OshaSourceFile'
      required:
        - id
        - establishmentId
        - establishmentName
        - ein
        - companyName
        - streetAddress
        - city
        - state
        - zipCode
        - naicsCode
        - naicsYear
        - industryDescription
        - establishmentType
        - size
        - annualAverageEmployees
        - totalHoursWorked
        - caseNumber
        - jobDescription
        - socCode
        - socDescription
        - socProbability
        - socReviewed
        - unexpectedNaicsSocCombo
        - dateOfIncident
        - incidentOutcome
        - dafwNumAway
        - djtrNumTr
        - typeOfIncident
        - timeStartedWork
        - timeOfIncident
        - timeUnknown
        - dateOfDeath
        - createdTimestamp
        - yearOfFiling
        - yearFilingFor
        - newIncidentLocation
        - newIncidentDescription
        - newNarBeforeIncident
        - newNarWhatHappened
        - newNarInjuryIllness
        - newNarObjectSubstance
        - natureCodePred
        - natureTitlePred
        - partCodePred
        - partTitlePred
        - eventCodePred
        - eventTitlePred
        - sourceCodePred
        - sourceTitlePred
        - secSourceCodePred
        - secSourceTitlePred
        - employerId
        - siteId
        - sourceFile
      description: >-
        One injury or illness case from ITA Form 300 and 301 case detail. Fields
        are OSHA’s own column names in camelCase, with values as OSHA publishes
        them.
    V2Error:
      type: object
      properties:
        error:
          type: string
          minLength: 1
          description: Human-readable explanation of the failure.
      required:
        - error
    V2OshaSourceFile:
      type: object
      properties:
        url:
          type: string
          description: OSHA or DOL file or API page the row was read from.
        sha256:
          type: string
          description: SHA-256 of that file as Effective downloaded it.
        retrievedAt:
          type: string
          description: When Effective downloaded it (RFC 3339).
      required:
        - url
        - sha256
        - retrievedAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Effective API key. Send Authorization: Bearer sk-eai-...'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.