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

# Search Consortium



## OpenAPI

````yaml /api-reference/openapi.json post /consortium/searches
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /consortium/searches:
    post:
      tags:
        - Consortium
      summary: Search Consortium
      operationId: search_consortium_consortium_searches_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1.ConsortiumCheckRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1.ConsortiumCheckResult'
        '403':
          description: No active consortium membership.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
                title: ConsortiumMembershipRequired
                description: >-
                  Your organization does not have an active fraud consortium
                  membership. Submit exclusion data to gain access to consortium
                  checks.
                examples:
                  - code: 605
                    message: >-
                      Your organization does not have an active fraud consortium
                      membership. Submit exclusion data to gain access to
                      consortium checks.
                    metadata: {}
        '422':
          description: The request body is malformed.
      security:
        - APIKeyHeader: []
components:
  schemas:
    v1.ConsortiumCheckRequest:
      properties:
        tin:
          anyOf:
            - type: string
            - type: 'null'
          title: Tin
          description: The business's 9-digit EIN/tax id.
          examples:
            - 12-3456789
        phones:
          items:
            type: string
          type: array
          title: Phones
          description: Business or owner phone numbers.
          examples:
            - - '+14155551234'
        emails:
          items:
            type: string
          type: array
          title: Emails
          description: Business or owner email addresses.
          examples:
            - - ap@acme.com
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
          description: The business's website.
          examples:
            - https://acme.com
        business_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Business Name
          description: The business's legal or trade name.
          examples:
            - Acme Corp
        business_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Business Id
          description: An Osiris business id to match exclusions linked to it.
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        officers:
          items:
            $ref: '#/components/schemas/v1.ConsortiumCheckOfficerName'
          type: array
          title: Officers
          description: Officer/owner names to match.
        address:
          anyOf:
            - $ref: '#/components/schemas/v1.ConsortiumCheckAddress'
            - type: 'null'
          description: The business's street address.
      additionalProperties: false
      type: object
      title: ConsortiumCheckRequest (v1)
      description: Strict JSON body for the standalone consortium check endpoint.
    v1.ConsortiumCheckResult:
      properties:
        matches:
          items:
            $ref: '#/components/schemas/v1.ConsortiumMatch'
          type: array
          title: Matches
          description: The matched consortium exclusion records, strongest first.
        total_matches:
          type: integer
          title: Total Matches
          description: The number of distinct exclusion records matched.
          examples:
            - 0
            - 1
            - 2
      type: object
      required:
        - total_matches
      title: ConsortiumCheckResult (v1)
      description: >-
        Response for a standalone consortium check.


        Mirrors the OFAC / PEP adhoc search envelope (``matches`` +
        ``total_matches``);

        only the per-match shape (``ConsortiumMatch``) is consortium-specific. A

        no-match — including the unsupported name-only case — is simply an empty

        ``matches`` with ``total_matches == 0``.
    APIError:
      properties:
        code:
          type: integer
          title: Code
        message:
          type: string
          title: Message
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
      type: object
      required:
        - code
        - message
      title: APIError
      description: >-
        APIError is a Pydantic model for standardizing error responses from the
        API.


        This class is used internally by APIException for JSON serialization.

        Users should typically work with APIException directly in exception
        catalogs.
    v1.ConsortiumCheckOfficerName:
      properties:
        first_name:
          type: string
          title: First Name
          description: The officer's first name.
          examples:
            - Jane
        last_name:
          type: string
          title: Last Name
          description: The officer's last name.
          examples:
            - Doe
        state:
          anyOf:
            - $ref: '#/components/schemas/StateAbbreviation'
            - type: 'null'
          description: State to scope the officer search to, if supplied.
          examples:
            - CA
      additionalProperties: false
      type: object
      required:
        - first_name
        - last_name
      title: ConsortiumCheckOfficerName (v1)
    v1.ConsortiumCheckAddress:
      properties:
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
          description: Street line of the address.
          examples:
            - 123 Main St
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: City of the address.
          examples:
            - Springfield
        state:
          anyOf:
            - $ref: '#/components/schemas/StateAbbreviation'
            - type: 'null'
          description: State of the address.
          examples:
            - IL
        zip:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip
          description: ZIP code of the address.
          examples:
            - '62704'
      additionalProperties: false
      type: object
      title: ConsortiumCheckAddress (v1)
    v1.ConsortiumMatch:
      properties:
        exclusion_id:
          type: string
          format: uuid
          title: Exclusion Id
          description: Identifier of the matched consortium exclusion record.
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        reported_on:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Reported On
          description: Date the matching exclusion was submitted to the consortium.
          examples:
            - '2023-08-01'
        business_name:
          type: string
          title: Business Name
          description: Legal name of the excluded business.
          examples:
            - Acme Corp
        doing_business_as:
          anyOf:
            - type: string
            - type: 'null'
          title: Doing Business As
          description: Trade name the business operates under, if different.
          examples:
            - Acme
        business_address:
          type: string
          title: Business Address
          description: Business address as reported with the exclusion.
          examples:
            - 500 Market St, San Francisco, CA 94105
        entity_type:
          anyOf:
            - $ref: '#/components/schemas/EntityType'
            - type: 'null'
          description: Legal structure of the business, if reported.
          examples:
            - LLC
        tin:
          anyOf:
            - type: string
            - type: 'null'
          title: Tin
          description: The business's 9-digit EIN/tax id.
          examples:
            - '123456789'
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Contact email reported with the exclusion.
          examples:
            - ap@acme.com
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
          description: Business website reported with the exclusion.
          examples:
            - https://acme.com
        primary_owner:
          $ref: '#/components/schemas/v1.ExclusionOwnerDetail'
          description: The primary owner reported on the exclusion.
        secondary_owner:
          anyOf:
            - $ref: '#/components/schemas/v1.ExclusionOwnerDetail'
            - type: 'null'
          description: The secondary owner, present only when one was reported.
        product_type:
          $ref: '#/components/schemas/ProductType'
          description: The product the defaulted/closed account was for.
          examples:
            - WC
        application_channel:
          anyOf:
            - $ref: '#/components/schemas/ApplicationChannel'
            - type: 'null'
          description: Channel the application came through, if reported.
          examples:
            - BR
        application_channel_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Application Channel Name
          description: Free-text name of the application channel, if reported.
          examples:
            - partner-referral
        application_ip_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Application Ip Address
          description: IP address recorded at application time, if reported.
          examples:
            - 203.0.113.42
        application_date:
          type: string
          format: date
          title: Application Date
          description: Date the original application was submitted.
          examples:
            - '2023-01-15'
        opened_on:
          type: string
          format: date
          title: Opened On
          description: Date the account was opened.
          examples:
            - '2023-02-01'
        closed_on:
          type: string
          format: date
          title: Closed On
          description: Date the account was closed.
          examples:
            - '2023-07-30'
        matures_on:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Matures On
          description: Maturity date of the account, if applicable.
          examples:
            - '2026-02-01'
        closure_status:
          $ref: '#/components/schemas/ClosureStatus'
          description: Status of the account at closure.
          examples:
            - WO
        closure_reason:
          $ref: '#/components/schemas/ClosureReason'
          description: Specific cause of closure.
          examples:
            - WPF
        first_payment_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: First Payment Default
          description: Whether the borrower defaulted on the first payment.
          examples:
            - true
        term_in_months:
          anyOf:
            - type: integer
            - type: 'null'
          title: Term In Months
          description: Term of the account in months, if applicable.
          examples:
            - 36
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
          description: Original principal/funded amount.
          examples:
            - 50000
        charge_off_amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Charge Off Amount
          description: Amount charged off at closure, if any.
          examples:
            - 42500
        payment_frequency:
          anyOf:
            - $ref: '#/components/schemas/PaymentFrequency'
            - type: 'null'
          description: Repayment frequency of the account, if reported.
          examples:
            - MY
        score:
          type: number
          maximum: 1
          minimum: 0
          title: Score
          description: >-
            Match confidence in [0, 1] — the strongest signal on this record:
            1.0 when any exact identifier (EIN, phone, email, website, address,
            business id) matched; otherwise the best Typesense name similarity.
            Matches are returned sorted by exact-before-fuzzy, then by this
            score.
        matched_on:
          items:
            $ref: '#/components/schemas/v1.ConsortiumMatchedField'
          type: array
          minItems: 1
          title: Matched On
          description: The input identifiers that matched this record.
      type: object
      required:
        - exclusion_id
        - business_name
        - business_address
        - primary_owner
        - product_type
        - application_date
        - opened_on
        - closed_on
        - closure_status
        - closure_reason
        - score
        - matched_on
      title: ConsortiumMatch (v1)
      description: >-
        One matched consortium exclusion record, with the identifiers that hit
        it.


        Extends :class:`ExclusionMatchDetail`, so the entire anonymized fraud

        payload — business, owners, and loan/closure facts — is flat on the
        match

        (mirroring ``OFACMatch`` / ``PEPMatch``). A record matched via several

        inputs (e.g. EIN *and* phone) is still a single match; each contributing

        input is listed in ``matched_on``.
    StateAbbreviation:
      enum:
        - AL
        - AK
        - AZ
        - AR
        - CA
        - CO
        - CT
        - DE
        - DC
        - FL
        - GA
        - HI
        - ID
        - IL
        - IN
        - IA
        - KS
        - KY
        - LA
        - ME
        - MD
        - MA
        - MI
        - MN
        - MS
        - MO
        - MT
        - NE
        - NV
        - NH
        - NJ
        - NM
        - NY
        - NC
        - ND
        - OH
        - OK
        - OR
        - PA
        - RI
        - SC
        - SD
        - TN
        - TX
        - UT
        - VT
        - VA
        - WA
        - WV
        - WI
        - WY
        - PR
        - VI
        - AE
        - AA
        - AP
        - GU
        - AS
      title: StateAbbreviation
      type: string
    EntityType:
      type: string
      enum:
        - CORPORATION
        - LLC
        - PARTNERSHIP
        - SOLE PROPRIETORSHIP
        - NON-PROFIT
        - TRUST
        - AGENT
        - UNKNOWN
      title: EntityType
    v1.ExclusionOwnerDetail:
      properties:
        first_name:
          type: string
          title: First Name
          description: Owner's first name.
          examples:
            - Jane
        middle_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Middle Name
          description: Owner's middle name, if reported.
          examples:
            - Q
        last_name:
          type: string
          title: Last Name
          description: Owner's last name.
          examples:
            - Doe
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
          description: Owner's phone number, normalized to E.164.
          examples:
            - '+15551234567'
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
          description: Owner's address as reported with the exclusion.
          examples:
            - 123 Main St, Springfield, IL 62704
      type: object
      required:
        - first_name
        - last_name
      title: ExclusionOwnerDetail (v1)
      description: |-
        One owner (primary or secondary) on a matched exclusion record.

        Built from the owner columns on the exclusion row itself, which are the
        same source the ingestion processor derives the ``ExclusionOwner`` rows
        from — so this is available on every record without depending on whether
        the processor has run or eager-loaded the owner relationship.
    ProductType:
      type: string
      enum:
        - BNK
        - CC
        - WC
        - LOC
        - EQF
        - MCA
        - PMT
        - Other
      title: ProductType
    ApplicationChannel:
      type: string
      enum:
        - OG
        - BR
        - ISO
        - Other
      title: ApplicationChannel
    ClosureStatus:
      type: string
      enum:
        - WO
        - SD
        - CL
        - PIF
      title: ClosureStatus
      description: What happened to the money when the account closed.
    ClosureReason:
      type: string
      enum:
        - WPF
        - WIF
        - WSF
        - WFU
        - WBC
        - WUP
        - WBK
        - WCX
        - CAE
        - PIF
      title: ClosureReason
      description: >-
        The specific cause of closure.


        Distinct from :class:`ClosureStatus` (what happened to the money) and

        :class:`ClosureFamily` (which bucket the cause falls in). When a case
        fits

        more than one family, members file the primary driver: confirmed fraud

        beats compliance beats credit, and within fraud, synthetic beats

        first-party.
    PaymentFrequency:
      type: string
      enum:
        - DY
        - WY
        - BW
        - MY
        - QY
        - AY
      title: PaymentFrequency
    v1.ConsortiumMatchedField:
      properties:
        type:
          $ref: '#/components/schemas/v1.ConsortiumMatchType'
          description: The identifier pass that produced the match.
          examples:
            - TIN
        value:
          type: string
          title: Value
          description: >-
            The caller's input that matched this record — structured identifiers
            in normalized form (phone as E.164, EIN as 9 digits), and the
            website as the URL supplied (matched on its domain).
          examples:
            - '123456789'
      type: object
      required:
        - type
        - value
      title: ConsortiumMatchedField (v1)
      description: One input identifier that matched an exclusion record.
    v1.ConsortiumMatchType:
      type: string
      enum:
        - TIN
        - PHONE
        - EMAIL
        - WEBSITE
        - BUSINESS_NAME
        - OFFICER
        - ADDRESS
        - BUSINESS_ID
      title: ConsortiumMatchType
      description: >-
        The identifier pass that produced a hit.


        Business-name and officer matches are distinct types (not a single
        ``name``)

        so a hit's ``matched_value`` is always the input that actually matched —
        an

        officer hit on a clean business reads as OFFICER("John Doe"), never as
        the

        applicant's unrelated business name.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````