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

## LexisNexis Liens

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

## What the service returns

| Service ID | Role | Stored result |
| - | - | - |
| `lexis_nexis_liens_and_judgment_search` | Requests both liens and judgments, classifies records, and stores the first lien TMS ID. | `commercial_data.lexis_nexis.liens_search` |
| `lexis_nexis_liens_report` | Uses the stored lien TMS ID for a detailed report. | `commercial_data.lexis_nexis.liens_report` |

The same search run also writes `commercial_data.lexis_nexis.judgments_search`. This guide covers only the Liens 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 |
| - | - | - |
| Liens search result | Conditional | A report requires the record identifier from the first search result classified as a lien. 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_liens_report" }
```

If no lien TMS ID is stored, the report service automatically runs the shared search first. A lien report requires `TMSId` from the first record classified as a lien.

## Retrieve results

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

| Data | Search path | Report path |
| - | - | - |
| Result | `commercial_data.lexis_nexis.liens_search` | `commercial_data.lexis_nexis.liens_report` |
| Status | `statuses.lexis_nexis.liens_search` | `statuses.lexis_nexis.liens_report` |
| Request | `request_data.lexis_nexis.liens_search` | `request_data.lexis_nexis.liens_report` |
| Date | `dates.lexis_nexis_liens_and_judgment_search` | `dates.lexis_nexis_liens_report` |

[Get Commercial Data](/api-reference/workflow-management/get-commercial-data) returns the latest `statuses`, `dates`, `commercial_data`, and `request_data` values for each requested service ID. The shared search has one status and date even though it stores two classified result subsets.

## Asynchronous behavior

Each enrichment request queues a job. Poll each service until its commercial-data status is `Success` or contains an error. `onqueue: true` is only queue acceptance. Report reruns reuse the stored lien 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": "LIENEXAMPLE001",
          "Amount": "368",
          "OriginFilingDate": { "Month": 12, "Day": 11, "Year": 2018 },
          "FilingJurisdiction": "CA",
          "Filings": { "Filing": [{ "Type": "COUNTY TAX LIEN", "Agency": "EXAMPLE COUNTY", "Number": "2018-001" }] },
          "Debtors": { "Debtor": [{ "OriginName": "EXAMPLE LLC" }] },
          "Creditors": { "Creditor": [{ "Name": "EXAMPLE COUNTY" }] }
        }],
        "RecordCount": 1
      }
    }
  }
}
```

Report result:

```json theme={"system"}
{
  "LienJudgmentReportResponseEx": {
    "response": {
      "Header": { "Status": 0, "QueryId": "101", "TransactionId": "txn-report" },
      "LienJudgments": {
        "LienJudgment": [{
          "TMSId": "LIENEXAMPLE001",
          "FilingJurisdiction": "CA",
          "MultipleDefendant": "false",
          "Filings": { "Filing": [{ "Type": "COUNTY TAX LIEN", "Number": "2018-001" }] }
        }]
      }
    }
  }
}
```

## Response fields

| Field | Type | Meaning | Format or behavior |
| - | - | - | - |
| `LienJudgmentSearchResponseEx.response` | object | Combined-search response envelope. | Contains `Header` and `Records`. |
| `LienJudgmentReportResponseEx.response` | object | Lien-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 liens by Lendflow. | Can be empty. |
| `Record[].TMSId` | string | Provider record ID used for report lookup. | First lien record is selected. |
| `Record[].Amount` | string or number | Reported lien amount. | Provider value; do not assume currency scaling. |
| `OriginFilingDate` | object | Original filing date. | `Month`, `Day`, and `Year` integers. |
| `FilingJurisdiction` | string | Filing jurisdiction. | Commonly a state code. |
| `Filings` | object | Filing-detail container. | Contains `Filing`. |
| `Filings.Filing` | array | Filing details. | Can be empty. |
| `Filing[].Type` | string | Filing type used in lien classification. | Provider text such as `COUNTY TAX LIEN`. |
| `Filing[].Agency` | string | Filing agency. | Provider text. |
| `Filing[].Number` | string | Filing 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. | The payload is classified by Lendflow; use the returned lien array for the stored lien subset. |
| `LienJudgments` | object | Detailed report container. | Contains `LienJudgment`. |
| `LienJudgments.LienJudgment` | array | Detailed lien report records. | Can be empty. |
| `MultipleDefendant` | string or boolean | Whether multiple defendants are indicated. | Provider commonly returns `"true"` or `"false"`. |

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

## Data Orchestration

The block is available under **Liens → LexisNexis**. Lien conditions use `lexis_nexis_liens_and_judgment_search`, not the report. Run the search before dependent conditions.

## 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 values. |
| Report requires `TMSId` | No record was classified as a lien, or the first lien lacked a TMS ID. | Review `liens_search` and improve match inputs before rerunning. |
| Empty lien subset with search records | Returned records were not classified as known lien types. | Review the raw stored subset and do not assume a report is available. |
| `failed_at` or error status | Provider or execution failure. | Inspect the exact lifecycle error and status path. |

## FAQ

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

  <Accordion title="Can I request only liens in search options?">
    No. The current request is fixed to include both categories and exposes no options.
  </Accordion>

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

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