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

# Clear Court Search

## Clear Court Search

Use Clear Court Search to retrieve court and related public-record results using the business and primary owner information on an application.

The Workflow Builder block is **Clear Court Search** (`clear_court_search`) and applies to a business entity. The dashboard presents all returned result groups and their record-type-specific details.

## Requirements

| Application field | Requirement | Notes |
| - | - | - |
| Business legal name | Required | Used to identify the business in Court Search. |
| Primary owner's first and last names | Required | Provide both name fields. |
| Primary owner's street, city, state, ZIP code, and country | Required | State and ZIP code must pass country-aware validation. |
| Primary owner's date of birth | Required | Use `MM/DD/YYYY`. |
| Primary owner's SSN or ITIN | Optional | The value must pass SSN validation when provided. |
| Primary owner's driver's license number | Optional | Provide the number when available. |

## API flow

1. Call [Enrich Business Credit Application](/api-reference/workflow-management/enrich-business-credit-application) with the application ID.
2. Set `provider` to `clear_court_search`; optionally include an underwriting `stage_id` UUID.
3. Do not include `options`.
4. Confirm `data.onqueue: true`, then poll [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) with `services[]=clear_court_search`.

```json theme={"system"}
{"provider": "clear_court_search", "stage_id": "00000000-0000-4000-8000-000000000000"}
```

## Data Orchestration availability

The **Clear Court Search** block declares `clear_court_search` as its related service and is available in Workflow Builder.

The current Data Orchestration attribute catalog does not expose court-search-specific outcome attributes. Read the stored `clear_court_search` response when court record details are required.

## What the service returns

| Result area | Response path | Meaning |
| - | - | - |
| Lifecycle | `data.statuses.clear.clear_court_search` | Latest execution state or error. |
| Provider status | `data.commercial_data.clear.clear_court_search.Status` | CLEAR request-level status. |
| Result groups | `data.commercial_data.clear.clear_court_search.ResultGroup` | Matching court and public-record groups. |
| Submitted request | `data.request_data.clear.clear_court_search` | Stored search criteria and permissible-purpose values. It can contain sensitive personal data; restrict access and logging. |

## Representative response

```json theme={"system"}
{
  "Status": {"StatusCode": "200", "SubStatusCode": "200"},
  "ResultGroup": [{
    "GroupId": "sanitized-group-id",
    "RecordCount": "1",
    "Relevance": "99",
    "DominantValues": {"CourtDominantValues": {"CaseState": "MN", "CaseDate": "12/14/2004"}},
    "RecordDetails": {"CourtResponseDetail": {
      "LienJudgeMultipleRecord": {
        "LienInfo": {"LienAmount": "$1,231.76", "StatusInfo": {"Status": "OPEN"}},
        "LienJudgeFilingInfo": {"FilingTypeInfo": {"FileType": "TAX LIEN"}},
        "Source": "Lien & Judgements"
      },
      "DocumentGuids": {"SourceName": "Lien & Judgements", "SourceDocumentGuid": "sanitized-document-id"}
    }}
  }]
}
```

## Response field meanings

| Field | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `Status.StatusCode` | String | Primary CLEAR status. | Provider-defined numeric string; successful fixture uses `"200"`. | With a status body. |
| `ResultGroup` | Object or array | Grouped matching court/public-record result. | Zero or more groups. | When records match. |
| `GroupId` | String | Opaque provider group identifier. | Provider-defined string. | Per result group. |
| `RecordCount` | String | Number of records in the group. | Integer encoded as a string. | Per result group. |
| `Relevance` | String | Provider match relevance. | Numeric string; fixture values range from `"0"` to `"99"`. | Per result group. |
| `DominantValues.CourtDominantValues` | Object | Name, address, case state, and case date summarizing the group. | Field-specific strings. | When CLEAR supplies dominant values. |
| `RecordDetails.CourtResponseDetail` | Object | Record-type-specific court detail. | Can contain lien/judgment, bankruptcy, UCC, or docket records. | Per returned record. |
| `LienJudgeMultipleRecord` | Object | Lien or judgment parties, amount/status, filing information, and source. | Provider-defined object. | For lien or judgment results. |
| `DocumentGuids` | Object or array | Source name and supporting-document identifier. | Opaque identifier. | When source documents are available. |
| Date fields | String | Provider-recorded dates. | Fixtures include `MM/DD/YYYY` and compact `YYYYMMDD`; parse defensively. | When supplied by the source. |

### Missing values and collections

| Shape | Interpretation |
| - | - |
| Missing `ResultGroup` | No matching result group was returned. |
| Empty element or array | The source did not provide the field. It is not a negative finding. |
| Object or array | Single XML elements can convert to objects and repeated elements to arrays. |
| Missing record subtype | The result is a different court/public-record type. Do not assume every result contains lien data. |

## Errors and statuses

| Signal | Meaning | Action |
| - | - | - |
| `Not yet started` | No run is recorded. | Queue the service or execute the published workflow. |
| `Started` | Lendflow is processing or polling CLEAR. CLEAR can return provider status `204` while results are not ready. | Continue polling. |
| `Success` | Lendflow stored a response. It does not mean a flag hit or that a record belongs to the subject. | Inspect the provider status and result object. |
| `Authorization failed.` | CLEAR rejected the configured credentials. | Correct the organization's CLEAR configuration or contact Lendflow. |
| Validation message | Required application data or a formatted value is invalid. | Correct the application and rerun. |
| Empty result or missing section | CLEAR returned no usable match or the configured definition omitted that section. | Treat the value as unavailable, not as a negative finding. |
| Provider or service error | CLEAR or Lendflow could not complete the operation. | Follow the stored message; retry only when appropriate. |

See [Data Provider Status Messages](/api-docs/docs/error-handling-external-data-provider-status-messages) for shared status guidance.

## FAQ

<AccordionGroup>
  <Accordion title="Which provider ID should I send?">Send `clear_court_search`; `clear_court_search` is the Workflow Builder block ID.</Accordion>
  <Accordion title="Does the search return only liens?">No. Court Search can return multiple record types. The Clear Business Liens dashboard view filters the response to lien/judgment records.</Accordion>
  <Accordion title="Do I send permissible-purpose values?">No. Lendflow resolves `GLB`, `DPPA`, and `VOTER` from the configured CLEAR credentials.</Accordion>
  <Accordion title="Does a high relevance value prove the record belongs to the subject?">No. It is provider match relevance and still requires review under your policy.</Accordion>
  <Accordion title="Why can ResultGroup be an object or an array?">CLEAR returns XML. One result and repeated results can produce different JSON-compatible shapes.</Accordion>
</AccordionGroup>
