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

# Baselayer KYB

## Baselayer KYB

Baselayer KYB searches for a business and can also analyze its website and predict its industry classification. The **Baselayer** Workflow Builder block supports three operations:

| Service | Service ID | Purpose |
| - | - | - |
| Business Search | `baselayer` | Matches and verifies business identity, registrations, officers, addresses, and watchlists. |
| Website Analysis | `baselayer_website_analysis` | Reviews the business website, domain, contact details, and domain registration. |
| NAICS Prediction | `baselayer_naics_prediction` | Predicts NAICS, SIC, and merchant category classifications. |

## Requirements

### Business Search

| Application field | Requirement | Notes |
| - | - | - |
| Business legal name | Required | Used to identify the business. |
| Business address line | Required | Used to match the business. |
| Business address city | Required | Used to match the business. |
| Business address state | Required | Used to match the business. |
| Business address ZIP code | Required | Used to match the business. |
| EIN | Optional | Improves matching. |
| Company officer names | Optional | Improves identity verification. |
| Business website | Optional | Used when Website Analysis is requested. |
| Primary-owner telephone and email | Optional | Improves identity verification. |

### Website Analysis

| Application field | Requirement | Notes |
| - | - | - |
| Website Analysis order ID | Conditional | Required from a prior Business Search run requested with Website Analysis. |
| Business website | Optional | Must be supplied to Business Search to make it available for analysis. |

### NAICS Prediction

| Application field | Requirement | Notes |
| - | - | - |
| NAICS Prediction order ID | Conditional | Required from a prior Business Search run requested with NAICS Prediction. |

## Run Baselayer KYB

Call [Enrich Business Credit Application](/api-reference/workflow-management/enrich-business-credit-application) with the applicable service ID. For Business Search, `requestOptions` can include `WebsiteAnalysis` and `NaicsPrediction`.

```json theme={"system"}
{
  "provider": "baselayer",
  "options": {
    "requestOptions": [
      "WebsiteAnalysis",
      "NaicsPrediction"
    ]
  }
}
```

The request is asynchronous. Poll [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) for the requested services.

| Service | Result path | Status path |
| - | - | - |
| Business Search | `commercial_data.baselayer.baselayer_business_search` | `statuses.baselayer.baselayer_business_search` |
| Website Analysis | `commercial_data.baselayer.baselayer_website_analysis` | `statuses.baselayer.baselayer_website_analysis` |
| NAICS Prediction | `commercial_data.baselayer.baselayer_naics_prediction` | `statuses.baselayer.baselayer_naics_prediction` |

## Run Baselayer in Data Orchestration

Baselayer Business Search, Website Analysis, and NAICS Prediction are available in Data Orchestration.

1. In the Lendflow Dashboard, open **Builders > Data Orchestration**.
2. Add the Baselayer service and select the result conditions needed by the template.
3. Ensure Business Search runs before a condition that depends on Website Analysis or NAICS Prediction.
4. Save and publish the template, then run it with [Execute Data Orchestration](/api-reference/data-orchestration/execute-data-orchestration).

## What the service returns

| Response area | Meaning |
| - | - |
| Business Search `business` | Matched business identity, registrations, names, officers, and watchlists. |
| Business Search match fields | Name, address, officer, website, registered-agent, and TIN match findings. |
| `orderables` | IDs for requested Website Analysis or NAICS Prediction operations. |
| Website Analysis `website_analysis` | Website status, contacts, social profiles, WHOIS information, and SSL validity. |
| NAICS Prediction `predicted_naics` | Predicted NAICS code, accuracy, risk level, keywords, SIC codes, and MCC codes. |

## Representative response

```json theme={"system"}
{
  "business_search": {
    "id": "search-id",
    "state": "COMPLETED",
    "business_name_match": "EXACT",
    "business_address_match": "STATE",
    "tin_matched": false,
    "business": {
      "name": "EXAMPLE BUSINESS LLC",
      "structure": "OTHER",
      "incorporation_date": "2019-01-01",
      "months_in_business": 84,
      "corporate_registrations": []
    }
  },
  "website_analysis": {
    "state": "COMPLETED",
    "website_analysis": {
      "parked": false,
      "website_build_status": "active",
      "ssl_validity": {
        "is_valid": true,
        "reason": null
      }
    }
  },
  "naics_prediction": {
    "state": "COMPLETED",
    "predicted_naics": {
      "code": "333999",
      "title": "Example industry",
      "accuracy": 0.8225,
      "risk_level": "low"
    }
  }
}
```

## Response attributes

### Business Search

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `id` | String | Baselayer search identifier. | UUID in the current fixture. | For every accepted search. |
| `state` | String | Search processing state. | Provider-controlled state such as `COMPLETED`. | Always. |
| `business` | Object or null | Matched business record. | Provider object. | When a business is matched. |
| `business.incorporation_date` | String or null | Reported incorporation date. | `YYYY-MM-DD` in the fixture. | When available. |
| `business.months_in_business` | Number or null | Age of the business. | Months. | When available. |
| `business.corporate_registrations` | Array | State registration records. | Zero or more objects. | When available. |
| `business_name_match` | String or null | Name-match finding. | Provider-controlled value such as `EXACT`. | When evaluated. |
| `business_address_match` | String or null | Address-match finding. | Provider-controlled value such as `STATE`. | When evaluated. |
| `tin_matched` | Boolean | Whether the submitted TIN matched. | `true` or `false`. | When evaluated. |
| `orderables` | Array | Requested follow-up analyses. | Items contain `id`, `type`, and `option`. | When additional options were ordered. |

### Website Analysis and NAICS Prediction

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `website_analysis.parked` | Boolean | Whether the domain appears parked. | `true` or `false`. | When website analysis completes. |
| `website_analysis.website_build_status` | String or null | Observed website status. | Provider text such as `active`. | When available. |
| `website_analysis.whois_record` | Object or null | Domain creation, update, expiration, age, and registrar information. | Provider object. | When WHOIS data is available. |
| `website_analysis.ssl_validity.is_valid` | Boolean | Whether the site's SSL certificate is valid. | `true` or `false`. | When SSL is evaluated. |
| `predicted_naics.code` | String | Predicted NAICS code. | Numeric code represented as text. | When prediction completes. |
| `predicted_naics.accuracy` | Number | Model confidence for the prediction. | Decimal from the provider; the fixture uses `0.8225`. | When prediction completes. |
| `predicted_naics.risk_level` | String or null | Provider risk level associated with the prediction. | Provider text such as `low`. | When available. |
| `predicted_naics.sic_codes` | Array | Related SIC classifications. | Objects with `code` and `description`. | When available. |
| `predicted_naics.mcc_codes` | Array | Related merchant category classifications. | Objects with code, description, and risk fields. | When available. |

## Errors and statuses

Lendflow status messages are separate from provider findings. A failed Business Search prevents dependent analyses from completing. Missing or invalid order IDs cause Website Analysis or NAICS Prediction to fail. Authentication, HTTP, and retrieval errors are recorded in the applicable nested Baselayer status.

## FAQ

<AccordionGroup>
  <Accordion title="Must Business Search run first?">
    Yes for the two follow-up services. Website Analysis and NAICS Prediction use order IDs generated by Business Search.
  </Accordion>

  <Accordion title="Are Website Analysis and NAICS Prediction separate guides?">
    No. They are operations within the single Baselayer Workflow Builder block and are documented together here.
  </Accordion>

  <Accordion title="Can Baselayer run in Data Orchestration?">
    Yes. All three Baselayer result areas are present in the current Data Orchestration service definition.
  </Accordion>
</AccordionGroup>
