> ## 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.

# LexisNexis Judgments

## LexisNexis Judgments

The **LexisNexis Judgments** block combines the shared liens-and-judgments search with a judgment report. Lendflow classifies the combined search records by filing type and stores judgments separately from liens.

## What the service returns

| Service ID | Role | Stored result |
| - | - | - |
| `lexis_nexis_liens_and_judgment_search` | Requests both categories, classifies records, and stores the first judgment TMS ID. | `commercial_data.lexis_nexis.judgments_search` |
| `lexis_nexis_judgments_report` | Uses the stored judgment TMS ID for a detailed report. | `commercial_data.lexis_nexis.judgments_report` |

The same search also writes `commercial_data.lexis_nexis.liens_search`. This guide covers only the Judgments block.

## Requirements

### Search

| Application field | Requirement | Notes |
| - | - | - |
| Business legal name | Optional | Used to identify potential business matches when available. |
| Business address | Optional | Street, city, state, and ZIP code can improve matching. State and ZIP code must pass validation when provided. |
| EIN | Optional | The value must pass validation when provided. |
| Primary owner's name | Optional | Used as an additional matching input when available. |
| Primary owner's SSN, address, and phone | Optional | These values can improve matching and must pass applicable validation when provided. |

### Report

| Application field | Requirement | Notes |
| - | - | - |
| Judgments search result | Conditional | A report requires the record identifier from the first search result classified as a judgment. If no usable result is stored, Lendflow runs the shared Liens and Judgments Search first. |

## Run the services

Call [Enrich Business Credit Application](/api-reference/workflow-management/enrich-business-credit-application):

```json theme={"system"}
{ "provider": "lexis_nexis_liens_and_judgment_search" }
```

Then run:

```json theme={"system"}
{ "provider": "lexis_nexis_judgments_report" }
```

If no judgment TMS ID is stored, the report automatically performs the shared search. The report requires the first record classified as a judgment to provide `TMSId`.

## Retrieve results

Poll `GET /api/applications/{application_id}/commercial_data` through [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) with both service IDs in `services[]`.

| Data | Search path | Report path |
| - | - | - |
| Result | `commercial_data.lexis_nexis.judgments_search` | `commercial_data.lexis_nexis.judgments_report` |
| Status | `statuses.lexis_nexis.judgments_search` | `statuses.lexis_nexis.judgments_report` |
| Request | `request_data.lexis_nexis.judgments_search` | `request_data.lexis_nexis.judgments_report` |
| Date | `dates.lexis_nexis_liens_and_judgment_search` | `dates.lexis_nexis_judgments_report` |

The search status and date come from the single shared service run. [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) returns the latest `statuses`, `dates`, `commercial_data`, and `request_data` values for the shared search service and the report service.

## Asynchronous behavior

Each enrichment request queues a job. `onqueue: true` confirms queue acceptance only. Poll each exact service until its commercial-data status is `Success` or contains an error. A report rerun reuses the stored judgment TMS ID unless it is absent.

## Example response

Search result:

```json theme={"system"}
{
  "LienJudgmentSearchResponseEx": {
    "response": {
      "Header": { "Status": 0, "QueryId": "101", "TransactionId": "txn-search" },
      "Records": {
        "Record": [{
          "TMSId": "JUDGMENTEXAMPLE001",
          "OriginFilingDate": { "Month": 1, "Day": 15, "Year": 2022 },
          "FilingJurisdiction": "WI",
          "Eviction": "N",
          "MultipleDefendant": "false",
          "Filings": { "Filing": [{ "Type": "CIVIL JUDGMENT", "Agency": "EXAMPLE CIRCUIT COURT", "Number": "22-CV-001" }] },
          "Debtors": { "Debtor": [{ "OriginName": "EXAMPLE LLC" }] },
          "Creditors": { "Creditor": [{ "Name": "EXAMPLE CREDITOR" }] }
        }],
        "RecordCount": 1
      }
    }
  }
}
```

Report result:

```json theme={"system"}
{
  "LienJudgmentReportResponseEx": {
    "response": {
      "Header": { "Status": 0, "QueryId": "101", "TransactionId": "txn-report" },
      "LienJudgments": {
        "LienJudgment": [{
          "TMSId": "JUDGMENTEXAMPLE001",
          "FilingJurisdiction": "WI",
          "Filings": { "Filing": [{ "Type": "CIVIL JUDGMENT", "Number": "22-CV-001" }] }
        }]
      }
    }
  }
}
```

## Response fields

| Field | Type | Meaning | Format or behavior |
| - | - | - | - |
| `LienJudgmentSearchResponseEx.response` | object | Combined-search response envelope. | Contains `Header` and `Records`. |
| `LienJudgmentReportResponseEx.response` | object | Judgment-report response envelope. | Contains `Header` and `LienJudgments`. |
| `Header` | object | Provider status and correlation metadata. | Returned by search and report. |
| `Header.Status` | integer | Provider response status. | `0` appears in successful fixtures. |
| `Header.QueryId` | string | Request correlation value. | Derived from the owner record when available. |
| `Header.TransactionId` | string | Provider transaction ID. | Provider-generated. |
| `Records` | object | Search-result container. | Contains `Record` and `RecordCount`. |
| `Records.Record` | array | Records classified as judgments by Lendflow. | Can be empty. |
| `Record[].TMSId` | string | Provider record ID used for the report. | First judgment record is selected. |
| `OriginFilingDate` | object | Original filing date. | `Month`, `Day`, and `Year` integers. |
| `FilingJurisdiction` | string | Filing jurisdiction. | Commonly a state code. |
| `Eviction` | string or boolean | Provider eviction indicator. | Commonly `"Y"` or `"N"`. |
| `MultipleDefendant` | string or boolean | Multiple-defendant indicator. | Commonly `"true"` or `"false"`. |
| `Filings` | object | Filing-detail container. | Contains `Filing`. |
| `Filings.Filing` | array | Filing details. | Can be empty. |
| `Filing[].Type` | string | Filing type used in judgment classification. | Provider text such as `CIVIL JUDGMENT`. |
| `Filing[].Agency` | string | Court or filing agency. | Provider text. |
| `Filing[].Number` | string | Filing or case number. | Jurisdiction-defined text. |
| `Debtors.Debtor` | array | Debtor parties. | Can be empty. |
| `Debtor[].OriginName` | string | Debtor name as filed. | Provider text. |
| `Creditors.Creditor` | array | Creditor parties. | Can be empty. |
| `Creditor[].Name` | string | Creditor name. | Provider text. |
| `Records.RecordCount` | integer | Provider's reported search count. | Use the returned classified array for the stored judgment subset. |
| `LienJudgments` | object | Detailed report container. | Contains `LienJudgment`. |
| `LienJudgments.LienJudgment` | array | Detailed judgment report records. | Can be empty. |

Only fields shown in the sanitized example are defined here. Additional provider fields can be returned.

## Data Orchestration

The block is available under **Judgments → LexisNexis**. Judgment conditions use `lexis_nexis_liens_and_judgment_search`; the report is not the prerequisite.

## Errors

| Result | Meaning | Action |
| - | - | - |
| HTTP `401` or `403` | Authentication or authorization failed. | Use an authorized bearer token. |
| HTTP `422` | Service access, body, or application data validation failed. | Confirm services and correct invalid application data. |
| Report requires `TMSId` | No record was classified as a judgment, or its TMS ID is absent. | Review `judgments_search` and improve search inputs. |
| Empty judgment subset with search records | Records were not classified as known judgment types. | Do not assume a report is available. |
| `failed_at` or error status | Provider or execution failure. | Inspect the exact lifecycle error and status. |

## FAQ

<AccordionGroup>
  <Accordion title="Why does the search include liens?">
    LexisNexis exposes one combined search. Lendflow classifies its records into separate judgment and lien results.
  </Accordion>

  <Accordion title="Can I configure the classification or search settings?">
    No. The filing-type lists and search settings are defined by the current backend implementation.
  </Accordion>

  <Accordion title="Does search success guarantee a judgment report?">
    No. A record must be classified as a judgment and provide a TMS ID.
  </Accordion>

  <Accordion title="Does onqueue true mean the report completed?">
    No. Poll the report lifecycle separately.
  </Accordion>
</AccordionGroup>
