> ## 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 client account by EIN

> Looks up the client account containing a business with the given EIN and returns a client-account-wide compliance summary, including every taxpayer on the account plus any not-yet-onboarded pending taxpayers. Returns 200 for any well-formed EIN; `result` is null and `currentStatus.status` is `NotMonitored` when no accessible business has that EIN.

Looks up the client account containing a business with the given EIN and returns a
**client-account-wide** compliance summary: every taxpayer on the account, plus any
not-yet-onboarded pending taxpayers.

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

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

## `result` fields

* **`clientAccountId`, `clientAccountName`** — the matched client account.
* **`amountDue`** — total balance owed across the client account.
* **`unallocatedCredits`** — total credits not yet applied to a liability.
* **`numMissingReturns`** — required returns not yet filed, within the recent lookback window.
* **`taxpayers[]`** — each taxpayer on the account, with its own `currentStatus` (never
  `NotMonitored`) and financials. `amountDue`, `unallocatedCredits`, and
  `numMissingReturns` are `null` while that taxpayer's data is pending.
* **`pendingTaxpayers[]`** — taxpayers added to the account but not yet onboarded.

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 /client-accounts/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:
  /client-accounts/lookup/ein:
    post:
      tags:
        - Client Accounts
      summary: Look up client account by EIN
      description: >-
        Looks up the client account containing a business with the given EIN and
        returns a client-account-wide compliance summary, including every
        taxpayer on the account plus any not-yet-onboarded pending taxpayers.
        Returns 200 for any well-formed EIN; `result` is null and
        `currentStatus.status` is `NotMonitored` when no accessible business has
        that EIN.
      operationId: lookupClientAccountByEin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LookupByEinRequest'
      responses:
        '200':
          description: >-
            Lookup completed. `result` carries the summary, or is null when
            nothing matched.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientAccountLookupResponse'
              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:
                      clientAccountId: 8f3c1e2a-2b44-4c1f-9a0e-1d2c3b4a5e6f
                      clientAccountName: Acme Holdings
                      amountDue: 18452.3
                      unallocatedCredits: 0
                      numMissingReturns: 1
                      taxpayers:
                        - id: 1a2b3c4d-0000-0000-0000-000000000001
                          name: Acme Holdings LLC
                          type: Business
                          isLookupMatch: true
                          tin: '111111111'
                          isTinCensored: false
                          currentStatus:
                            status: NotCompliant
                            badgeGraphicUrl: >-
                              https://taxrock-assets.s3.us-east-2.amazonaws.com/public/status-badges/taxrock-badge-not-compliant.svg
                          amountDue: 18000
                          unallocatedCredits: 0
                          numMissingReturns: 1
                        - id: 1a2b3c4d-0000-0000-0000-000000000002
                          name: Jane Q Doe
                          type: Individual
                          isLookupMatch: false
                          tin: xxxxx6789
                          isTinCensored: true
                          currentStatus:
                            status: AtRisk
                            badgeGraphicUrl: >-
                              https://taxrock-assets.s3.us-east-2.amazonaws.com/public/status-badges/taxrock-badge-at-risk.svg
                          amountDue: 452.3
                          unallocatedCredits: 0
                          numMissingReturns: 0
                      pendingTaxpayers: []
                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:
                      clientAccountId: 7e6d5c4b-3a29-4817-8c6d-5e4f3a2b1c09
                      clientAccountName: Newco Ventures
                      amountDue: 0
                      unallocatedCredits: 0
                      numMissingReturns: 0
                      taxpayers:
                        - id: 2b3c4d5e-0000-0000-0000-000000000001
                          name: Newco Ventures Inc
                          type: Business
                          isLookupMatch: true
                          tin: '441234567'
                          isTinCensored: false
                          currentStatus:
                            status: DataPending
                            badgeGraphicUrl: >-
                              https://taxrock-assets.s3.us-east-2.amazonaws.com/public/status-badges/taxrock-badge-data-pending.svg
                          amountDue: null
                          unallocatedCredits: null
                          numMissingReturns: null
                      pendingTaxpayers:
                        - id: 2b3c4d5e-0000-0000-0000-000000000002
                          name: Side Co LLC
                          type: Business
                          isLookupMatch: false
                          tin: '550001111'
                          isTinCensored: false
                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.
                invalidRequest:
                  summary: Missing or non-string EIN
                  value:
                    error: invalid_request
                    message: businessEin is required.
        '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
    ClientAccountLookupResponse:
      type: object
      required:
        - currentStatus
        - result
      properties:
        currentStatus:
          $ref: '#/components/schemas/CurrentStatus'
        result:
          anyOf:
            - $ref: '#/components/schemas/ClientAccountSummary'
            - type: 'null'
          description: The client-account 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.
    ClientAccountSummary:
      type: object
      required:
        - clientAccountId
        - clientAccountName
        - amountDue
        - unallocatedCredits
        - numMissingReturns
        - taxpayers
        - pendingTaxpayers
      properties:
        clientAccountId:
          type: string
          format: uuid
        clientAccountName:
          type: string
        amountDue:
          type: number
          description: Total balance owed across the client account.
        unallocatedCredits:
          type: number
          description: Total credits not yet applied to a liability.
        numMissingReturns:
          type: integer
          description: >-
            Required returns not yet filed across the account, within the recent
            lookback window.
        taxpayers:
          type: array
          items:
            $ref: '#/components/schemas/ClientAccountTaxpayer'
        pendingTaxpayers:
          type: array
          items:
            $ref: '#/components/schemas/PendingTaxpayer'
    ClientAccountTaxpayer:
      type: object
      required:
        - id
        - name
        - type
        - isLookupMatch
        - tin
        - isTinCensored
        - currentStatus
        - amountDue
        - unallocatedCredits
        - numMissingReturns
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        type:
          $ref: '#/components/schemas/TaxpayerType'
        isLookupMatch:
          type: boolean
          description: True on the row whose TIN matched the EIN you looked up.
        tin:
          type:
            - string
            - 'null'
          description: >-
            Unformatted digits. Raw nine-digit EIN for businesses; censored to
            the last four (xxxxx0123) for individuals.
        isTinCensored:
          type: boolean
          description: >-
            True when `tin` is censored, so you needn't infer the policy from
            `type`.
        currentStatus:
          $ref: '#/components/schemas/CurrentStatus'
        amountDue:
          type:
            - number
            - 'null'
          description: Null while this taxpayer's data is pending.
        unallocatedCredits:
          type:
            - number
            - 'null'
          description: Null while this taxpayer's data is pending.
        numMissingReturns:
          type:
            - integer
            - 'null'
          description: >-
            Required returns not yet filed in the recent lookback window. Null
            while data is pending.
    PendingTaxpayer:
      type: object
      required:
        - id
        - name
        - type
        - isLookupMatch
        - tin
        - isTinCensored
      description: A taxpayer added to the client account but not yet onboarded.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        type:
          $ref: '#/components/schemas/TaxpayerType'
        isLookupMatch:
          type: boolean
        tin:
          type:
            - string
            - 'null'
          description: Null if not provided yet.
        isTinCensored:
          type: boolean
    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.

````