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

# List External Ids

> List records by external IDs and return a mapping of external_id to internal id.



## OpenAPI

````yaml post /tenant/list-external-ids
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /tenant/list-external-ids:
    post:
      tags:
        - tenant
      summary: List External Ids
      description: >-
        List records by external IDs and return a mapping of external_id to
        internal id.
      operationId: list_external_ids_tenant_list_external_ids_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListExternalIds'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListExternalIdsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ListExternalIds:
      properties:
        tableName:
          type: string
          title: Tablename
        externalIds:
          items:
            type: string
          type: array
          title: Externalids
      type: object
      required:
        - tableName
        - externalIds
      title: ListExternalIds
      description: List records by external IDs and return mapping to internal IDs.
    ListExternalIdsResponse:
      properties:
        tableName:
          type: string
          title: Tablename
        externalIdToId:
          additionalProperties:
            type: string
          type: object
          title: Externalidtoid
        foundCount:
          type: integer
          title: Foundcount
        requestedCount:
          type: integer
          title: Requestedcount
      type: object
      required:
        - tableName
        - externalIdToId
        - foundCount
        - requestedCount
      title: ListExternalIdsResponse
      description: Response for listing external IDs.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````