> ## 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.

# Match an employer

> Employers are Effective’s grouping of OSHA’s per-workplace rows into companies: rows become sites by address, ZIP and name, and sites become employers by FEIN, else by name within a state. Find the employer for a FEIN, or for a name with an address, city, state or ZIP. Returns ranked candidates with a confidence and the inputs that agreed. A FEIN with no match still falls back to name and address, because most OSHA inspection and injury rows carry no FEIN. Candidates under 0.3 confidence are left out; an empty list means nothing on file matched, not a clean record. Needs the OSHA dataset enabled for your organization. Read-only; private, no-store. 



## OpenAPI

````yaml /openapi.json get /insurance/employers/match
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/employers/match:
    get:
      tags:
        - OSHA
      summary: Match an employer
      description: >-
        Employers are Effective’s grouping of OSHA’s per-workplace rows into
        companies: rows become sites by address, ZIP and name, and sites become
        employers by FEIN, else by name within a state. Find the employer for a
        FEIN, or for a name with an address, city, state or ZIP. Returns ranked
        candidates with a confidence and the inputs that agreed. A FEIN with no
        match still falls back to name and address, because most OSHA inspection
        and injury rows carry no FEIN. Candidates under 0.3 confidence are left
        out; an empty list means nothing on file matched, not a clean record.
        Needs the OSHA dataset enabled for your organization. Read-only;
        private, no-store. 
      operationId: matchEmployers
      parameters:
        - schema:
            type: string
            pattern: ^\d{2}-?\d{7}$
            description: Federal Employer Identification Number, with or without the dash.
          required: false
          description: Federal Employer Identification Number, with or without the dash.
          name: fein
          in: query
        - schema:
            type: string
            minLength: 2
            maxLength: 200
            description: Employer or business name.
          required: false
          description: Employer or business name.
          name: name
          in: query
        - schema:
            type: string
            maxLength: 200
            description: Street address of a workplace.
          required: false
          description: Street address of a workplace.
          name: address
          in: query
        - schema:
            type: string
            maxLength: 100
          required: false
          name: city
          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{5}(-?\d{4})?$
            description: Five-digit ZIP code; ZIP+4 is accepted.
          required: false
          description: Five-digit ZIP code; ZIP+4 is accepted.
          name: zip
          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: integer
            minimum: 1
            maximum: 20
            default: 5
            description: Candidates to return (1-20).
          required: false
          description: Candidates to return (1-20).
          name: limit
          in: query
      responses:
        '200':
          description: Ranked candidates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2EmployerMatches'
        '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:
    V2EmployerMatches:
      type: object
      properties:
        candidates:
          type: array
          items:
            type: object
            properties:
              employer:
                $ref: '#/components/schemas/V2Employer'
              confidence:
                type: number
                minimum: 0
                maximum: 1
                description: >-
                  Ranking guide from 0 to 1, not a probability. A FEIN on file
                  scores 0.9 or more; without one, name and address carry the
                  score.
              matchedOn:
                type: array
                items:
                  type: string
                  enum:
                    - fein
                    - name
                    - address
                    - zip
                    - city
                    - state
                    - naics
                description: Inputs that agreed with this employer’s OSHA data.
            required:
              - employer
              - confidence
              - matchedOn
        dataVersion:
          type: string
          nullable: true
          description: >-
            Version of the employer and site matching. It changes each time
            matching is rebuilt after an OSHA load (weekly). Null before the
            first build.
      required:
        - candidates
        - dataVersion
    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
    V2Employer:
      type: object
      properties:
        id:
          type: string
          pattern: ^emp_[0-9a-f]{20}$
          description: 'Effective employer ID: emp_ followed by 20 hex characters.'
        name:
          type: string
          description: Most recent name OSHA has on file for this employer.
        aliases:
          type: array
          items:
            type: string
          description: >-
            Other names this employer appears under in OSHA data, uppercased (up
            to 25).
        feins:
          type: array
          items:
            type: string
          description: >-
            Nine-digit FEINs from the employer’s Form 300A filings, without
            dashes.
        naics:
          type: string
          nullable: true
          description: Most recent NAICS code on file.
        states:
          type: array
          items:
            type: string
          description: States where the employer has sites.
        siteCount:
          type: integer
          description: Number of sites (workplaces) matched to this employer.
        firstSeen:
          type: string
          nullable: true
          description: Earliest OSHA event date, YYYY-MM-DD.
        lastSeen:
          type: string
          nullable: true
          description: Latest OSHA event date, YYYY-MM-DD.
      required:
        - id
        - name
        - aliases
        - feins
        - naics
        - states
        - siteCount
        - firstSeen
        - lastSeen
    V2Error:
      type: object
      properties:
        error:
          type: string
          minLength: 1
          description: Human-readable explanation of the failure.
      required:
        - error
  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.