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

# Look up taxpayer by EIN

> Looks up the single business taxpayer with the given EIN and returns its compliance summary. The single-taxpayer counterpart to the client-account lookup. Returns 200 for any well-formed EIN; `result` is null when no accessible business has that EIN.

Looks up the single business taxpayer with the given EIN and returns its compliance
summary. The single-taxpayer counterpart to the
[client-account lookup](/api-reference/client-accounts/lookup-by-ein).

Returns `200` for any well-formed EIN. `result` is `null` when no business with that EIN
is accessible to you. A missing or malformed `businessEin` returns `400`.

<Note>
  Status values, badges, and `tin` censoring are described once in
  [Concepts → Compliance status](/concepts/compliance-status).
</Note>

## `result` fields

* **`id`, `name`, `type`** — the matched taxpayer (`type` is always `Business` for EIN lookups).
* **`tin`, `isTinCensored`** — the business EIN (uncensored for businesses).
* **`amountDue`, `unallocatedCredits`** — this taxpayer's balances. `null` while data is pending.
* **`numMissingReturns`** — required returns not yet filed, within the recent lookback
  window. `null` while data is pending.

A business still being onboarded (not yet fully provisioned) still matches: it returns
`currentStatus.status` of `DataPending` with null financial fields.

Use the **Run** panel to try it: paste an access token (see the
[Quickstart](/quickstart)) and send a sandbox EIN such as `11-1111111`.


## OpenAPI

````yaml POST /taxpayers/lookup/ein
openapi: 3.1.0
info:
  title: TaxRock Delegate API
  version: 1.0.0
  description: >-
    Read a TaxRock user's tax-compliance data on that user's behalf, after the
    user grants consent once. A standard OAuth 2.0 Authorization Code + PKCE
    integration. See the Guides for the auth flow; the field-level semantics
    (statuses, badges, TIN censoring) are described in Concepts → Compliance
    status.
servers:
  - url: https://delegate-demo.api.taxrock.com
    description: Sandbox
  - url: https://delegate.api.taxrock.com
    description: Production
security:
  - bearerAuth: []
paths:
  /taxpayers/lookup/ein:
    post:
      tags:
        - Taxpayers
      summary: Look up taxpayer by EIN
      description: >-
        Looks up the single business taxpayer with the given EIN and returns its
        compliance summary. The single-taxpayer counterpart to the
        client-account lookup. Returns 200 for any well-formed EIN; `result` is
        null when no accessible business has that EIN.
      operationId: lookupTaxpayerByEin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LookupByEinRequest'
      responses:
        '200':
          description: >-
            Lookup completed. `result` carries the taxpayer summary, or is null
            when nothing matched.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxpayerLookupResponse'
              examples:
                available:
                  summary: Available (data loaded)
                  value:
                    currentStatus:
                      status: NotCompliant
                      badgeGraphicUrl: >-
                        https://taxrock-assets.s3.us-east-2.amazonaws.com/public/status-badges/taxrock-badge-not-compliant.svg
                    result:
                      id: 1a2b3c4d-0000-0000-0000-000000000001
                      name: Acme Holdings LLC
                      type: Business
                      tin: '111111111'
                      isTinCensored: false
                      amountDue: 18000
                      unallocatedCredits: 0
                      numMissingReturns: 1
                dataPending:
                  summary: Matched, data not ready
                  value:
                    currentStatus:
                      status: DataPending
                      badgeGraphicUrl: >-
                        https://taxrock-assets.s3.us-east-2.amazonaws.com/public/status-badges/taxrock-badge-data-pending.svg
                    result:
                      id: 2b3c4d5e-0000-0000-0000-000000000002
                      name: Side Co LLC
                      type: Business
                      tin: '550001111'
                      isTinCensored: false
                      amountDue: null
                      unallocatedCredits: null
                      numMissingReturns: null
                notMonitored:
                  summary: Not monitored (no taxpayer with that EIN)
                  value:
                    currentStatus:
                      status: NotMonitored
                      badgeGraphicUrl: >-
                        https://taxrock-assets.s3.us-east-2.amazonaws.com/public/status-badges/taxrock-badge-not-monitored.svg
                    result: null
        '400':
          description: The `businessEin` was missing or malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalidEin:
                  summary: Malformed EIN
                  value:
                    error: invalid_ein
                    message: >-
                      businessEin must contain nine digits; dashes and spaces
                      are ignored.
        '401':
          description: >-
            Missing or invalid access token. Refresh the token, or send the user
            back through the authorization flow.
        '403':
          description: >-
            The connected user lacks the required permission. Re-consent will
            not fix this; treat as a configuration issue.
components:
  schemas:
    LookupByEinRequest:
      type: object
      required:
        - businessEin
      properties:
        businessEin:
          type: string
          description: 'Business EIN: nine digits, with dashes and spaces ignored.'
          examples:
            - 11-1111111
    TaxpayerLookupResponse:
      type: object
      required:
        - currentStatus
        - result
      properties:
        currentStatus:
          $ref: '#/components/schemas/CurrentStatus'
        result:
          anyOf:
            - $ref: '#/components/schemas/TaxpayerSummary'
            - type: 'null'
          description: The taxpayer summary, or null when nothing matched.
    ApiError:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: >-
            Machine-readable error code, e.g. `invalid_ein` or
            `invalid_request`.
        message:
          type: string
          description: Human-readable explanation.
    CurrentStatus:
      type: object
      required:
        - status
        - badgeGraphicUrl
      description: >-
        Compliance status plus an embeddable badge graphic. Always present on a
        response.
      properties:
        status:
          type: string
          enum:
            - NotMonitored
            - DataPending
            - Compliant
            - AtRisk
            - NotCompliant
          description: See Concepts → Compliance status for the full meaning of each value.
        badgeGraphicUrl:
          type: string
          format: uri
          description: >-
            Publicly hosted SVG badge for this status; embed it directly to
            display the status.
    TaxpayerSummary:
      type: object
      required:
        - id
        - name
        - type
        - tin
        - isTinCensored
        - amountDue
        - unallocatedCredits
        - numMissingReturns
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        type:
          $ref: '#/components/schemas/TaxpayerType'
        tin:
          type:
            - string
            - 'null'
          description: >-
            Unformatted digits. Raw nine-digit EIN for businesses; censored to
            the last four for individuals.
        isTinCensored:
          type: boolean
        amountDue:
          type:
            - number
            - 'null'
          description: Null while data is pending.
        unallocatedCredits:
          type:
            - number
            - 'null'
          description: Null while data is pending.
        numMissingReturns:
          type:
            - integer
            - 'null'
          description: >-
            Required returns not yet filed in the recent lookback window. Null
            while data is pending.
    TaxpayerType:
      type: string
      enum:
        - Business
        - Individual
      description: Whether the taxpayer is a business (EIN) or an individual (SSN).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        The access token obtained from the OAuth flow (see Guides → Quickstart).
        Paste it here to run the endpoint.

````