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

# Dun & Bradstreet Company Information

## Dun & Bradstreet Company Information

Use the **Dun & Bradstreet Company Information** Workflow Builder block to retrieve D\&B Company Information Level 2 for a business. The block ID is `dnb_company_information_kyb`, and the Lendflow service ID is `dnb_ci_l2`.

The service resolves the business to a D‑U‑N‑S Number when necessary, then requests D\&B Direct+ data block `companyinfo_L2_v1`. It returns identity, address, operating-status, industry, employee, and available financial profile data. It does not return a credit decision.

## Requirements

### Business information used for D‑U‑N‑S resolution

| Application field | Requirement | Notes |
| - | - | - |
| D‑U‑N‑S Number | Conditional | Required to retrieve Company Information. If it is unavailable, Lendflow runs Business Match first. Must contain nine characters when stored through the application API. |
| Business legal name | Conditional | Required for automatic Business Match when no D‑U‑N‑S Number is stored. |
| Business address country | Conditional | Required for automatic Business Match when no D‑U‑N‑S Number is stored; use a two-letter country code. |
| Business address line 1 | Optional | Improves business matching. |
| Business address line 2 | Optional | Additional address information for matching. |
| Business address city | Optional | Improves business matching. |
| Business address state or region | Optional | Must be valid for the selected country when provided. |
| Business address postal code | Optional | Must be valid for the selected country when provided. |
| Business telephone | Optional | Must be valid when provided; improves matching. |
| Business email | Optional | Must be a valid email address when provided; improves matching. |
| EIN | Optional | Used as a US registration-number match signal after normalization. |
| Canadian business number | Optional | Used as a Canadian registration-number match signal after normalization. |

## Execute the block

### Data Orchestration

1. Add **Dun & Bradstreet Company Information** to an underwriting stage in Workflow Builder.
2. Connect the block according to the outcomes required by your orchestration.
3. Publish the Data Orchestration template.
4. Call [Execute Data Orchestration](/api-reference/data-orchestration/execute-data-orchestration) at `POST /api/applications/{application_id}/data_orchestration/execute` with the published `template_id` and `application_id`. Include `stage_id` only when you need to identify a specific underwriting stage.

```bash theme={"system"}
curl --request POST \
  --url https://api.lendflow.com/api/applications/YOUR_APPLICATION_ID/data_orchestration/execute \
  --header "Authorization: Bearer $LENDFLOW_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "template_id": "YOUR_TEMPLATE_ID",
    "application_id": "YOUR_APPLICATION_ID"
  }'
```

The execution endpoint schedules the orchestration and returns `{"data":{"executed":true}}`. A successful HTTP response means the run was scheduled; it does not mean D\&B finished successfully. Follow the application's orchestration logs until the run reaches a terminal state.

During the service step, Lendflow:

1. Checks the business for an existing `duns_number`.
2. Automatically runs `dnb_bm_l1` when the D‑U‑N‑S Number is missing.
3. Stores the first match candidate's D‑U‑N‑S Number when one is returned.
4. Authenticates to D\&B Direct+.
5. Calls D\&B `GET /v1/data/duns/{duns}` with `blockIDs=companyinfo_L2_v1`.
6. Stores the provider response as the latest `dnb_ci_l2` data and allows the orchestration to continue according to the configured outcome.

### Retrieve the result

Call [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) and request only this service.

```bash theme={"system"}
curl --request GET \
  --url "https://api.lendflow.com/api/applications/YOUR_APPLICATION_ID/commercial_data?services[]=dnb_ci_l2" \
  --header "Authorization: Bearer $LENDFLOW_TOKEN"
```

The Lendflow response wrapper is:

* `data.commercial_data.dnb.ci_l2`: the latest stored D\&B payload.
* `data.statuses.dnb.ci_l2`: the latest service status or captured error.
* `data.dates.dnb_ci_l2`: the latest service date.
* `data.request_data.dnb.ci_l2`: the stored provider request.

## What the service returns

| Result area | Response path | How to interpret it |
| - | - | - |
| D\&B block processing | `blockStatus[]` | Provider-reported status for each requested or supporting D\&B data block. |
| Company profile | `organization` | The organization associated with the resolved D‑U‑N‑S Number. Availability varies by company, country, and D\&B coverage. |
| Request confirmation | `inquiryDetail` | The D‑U‑N‑S Number and data block IDs used for the D\&B lookup. |
| Provider transaction | `transactionDetail` | D\&B transaction identifier, response language, and timestamp. |

### Representative response

This sanitized example is reduced from Lendflow's current D\&B fixtures. It shows the normal `companyinfo_L2_v1` shape without presenting the entire provider payload.

```json theme={"system"}
{
  "blockStatus": [
    {
      "reason": null,
      "status": "ok",
      "blockID": "companyinfo_L2_v1"
    },
    {
      "reason": null,
      "status": "ok",
      "blockID": "baseinfo_L1_v1"
    }
  ],
  "organization": {
    "duns": "123456789",
    "primaryName": "Example Services LLC",
    "countryISOAlpha2Code": "US",
    "startDate": "2018",
    "primaryAddress": {
      "streetAddress": {
        "line1": "100 Example Street",
        "line2": null
      },
      "addressLocality": {
        "name": "Austin"
      },
      "addressRegion": {
        "name": "Texas",
        "abbreviatedName": "TX"
      },
      "postalCode": "78701",
      "addressCountry": {
        "name": "United States",
        "isoAlpha2Code": "US"
      }
    },
    "dunsControlStatus": {
      "operatingStatus": {
        "dnbCode": 9074,
        "description": "Active"
      },
      "isMarketable": false,
      "isDelisted": false
    },
    "industryCodes": [
      {
        "code": "541430",
        "priority": 1,
        "description": "Graphic Design Services",
        "typeDnBCode": 37788,
        "typeDescription": "North American Industry Classification System 2022"
      }
    ],
    "financials": [
      {
        "unitCode": "Single Units",
        "yearlyRevenue": [
          {
            "value": 46000,
            "currency": "USD"
          }
        ],
        "reliabilityDnBCode": 9094,
        "reliabilityDescription": "Modelled",
        "informationScopeDescription": "Consolidated"
      }
    ],
    "numberOfEmployees": [
      {
        "value": 5,
        "employeeFiguresDate": "2022-03-14",
        "reliabilityDnBCode": 9094,
        "reliabilityDescription": "Modelled",
        "informationScopeDescription": "Consolidated"
      }
    ],
    "defaultCurrency": "USD",
    "isStandalone": true,
    "isSmallBusiness": true
  },
  "inquiryDetail": {
    "duns": "123456789",
    "blockIDs": [
      "companyinfo_L2_v1"
    ]
  },
  "transactionDetail": {
    "inLanguage": "en-US",
    "transactionID": "SANITIZED-TRANSACTION-ID",
    "transactionTimestamp": "2023-05-26T19:18:35.062Z"
  }
}
```

## Response attributes shown in the example

### Provider processing and transaction

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `blockStatus[].blockID` | String | D\&B data block whose processing status is reported. | The example contains `companyinfo_L2_v1` and its supporting `baseinfo_L1_v1` block. | When D\&B reports block processing. |
| `blockStatus[].status` | String | Provider status for that D\&B block. | Lendflow fixtures show `ok`. Other provider values are governed by the authenticated D\&B Direct+ schema and must not be treated as Lendflow lifecycle statuses. | When D\&B reports block processing. |
| `blockStatus[].reason` | String or null | Provider explanation associated with the block status. | `null` when no reason is supplied. | When D\&B reports block processing. |
| `inquiryDetail.duns` | String | D‑U‑N‑S Number used in the lookup. | Nine-character identifier. Preserve leading zeros. | On a D\&B lookup response. |
| `inquiryDetail.blockIDs[]` | Array of strings | Data blocks requested from D\&B. | `companyinfo_L2_v1` for this service. | On a D\&B lookup response. |
| `transactionDetail.inLanguage` | String | Language and locale of the provider response. | The fixture uses `en-US`. | On a D\&B response. |
| `transactionDetail.transactionID` | String | D\&B's identifier for the provider transaction. | Provider-defined string. | On a D\&B response. |
| `transactionDetail.transactionTimestamp` | String | Date and time D\&B created the response. | ISO 8601 UTC timestamp; the example uses milliseconds and a trailing `Z`. | On a D\&B response. |

### Organization identity and address

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `organization.duns` | String | D\&B's unique identifier for the organization. | Nine-character D‑U‑N‑S Number. | When an organization is returned. |
| `organization.primaryName` | String | Primary name by which the organization is known. | Provider-supplied text. | When available. |
| `organization.countryISOAlpha2Code` | String | Country associated with the organization. | Two-letter country code, such as `US`. | When available. |
| `organization.startDate` | String or null | Date the organization claims as its established date. | Precision can vary. Lendflow fixtures include a four-digit year; do not assume a full date. | When available. |
| `organization.primaryAddress.streetAddress.line1` | String | First line of the primary address. | Provider-supplied text. | When a primary street address is available. |
| `organization.primaryAddress.streetAddress.line2` | String or null | Second line of the primary address. | `null` when D\&B has no second line. | When the address object is returned. |
| `organization.primaryAddress.addressLocality.name` | String | City, town, or other locality. | Provider-supplied text. | When available. |
| `organization.primaryAddress.addressRegion.name` | String | Full region or state name. | Provider-supplied text. | When available. |
| `organization.primaryAddress.addressRegion.abbreviatedName` | String | Abbreviated region or state. | For example, `TX`. | When available. |
| `organization.primaryAddress.postalCode` | String | Postal code for the primary address. | String; may contain separators or extended postal codes. | When available. |
| `organization.primaryAddress.addressCountry.name` | String | Display name of the address country. | Provider-supplied text. | When available. |
| `organization.primaryAddress.addressCountry.isoAlpha2Code` | String | Address country code. | Two-letter code, such as `US`. | When available. |

### Operating, industry, financial, and size information

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `organization.dunsControlStatus.operatingStatus.dnbCode` | Number | D\&B code for the high-level operating status. | Provider-maintained code. Interpret it with the accompanying description. | When D\&B supplies control status. |
| `organization.dunsControlStatus.operatingStatus.description` | String | Human-readable operating status. | Fixtures include values such as `Active` and `Out of business`. | When D\&B supplies control status. |
| `organization.dunsControlStatus.isMarketable` | Boolean | Whether the record satisfies D\&B's marketability rules for sales and marketing products. | `true` or `false`; this is not a credit recommendation. | When available. |
| `organization.dunsControlStatus.isDelisted` | Boolean | Whether the organization has requested exclusion from direct-marketing lists. | `true` or `false`; this is not the same as operating status. | When available. |
| `organization.industryCodes[].code` | String | Industry-classification code. | Interpret with `typeDescription`; code systems differ. | For each available industry classification. |
| `organization.industryCodes[].priority` | Number | Provider ordering for classifications of the same type. | Positive integer; `1` is the highest priority shown in fixtures. | For each returned classification. |
| `organization.industryCodes[].description` | String | Description of the industry code. | Provider-supplied text. | For each returned classification. |
| `organization.industryCodes[].typeDnBCode` | Number | D\&B code identifying the classification scheme. | Provider-maintained code. | For each returned classification. |
| `organization.industryCodes[].typeDescription` | String | Name and version of the classification scheme. | For example, `North American Industry Classification System 2022`. | For each returned classification. |
| `organization.financials[].unitCode` | String | Unit applied to the financial values in that entry. | The fixture uses `Single Units`; read this field before interpreting values. | When financial data is available. |
| `organization.financials[].yearlyRevenue[].value` | Number | Revenue amount in the entry's unit and currency. | Numeric amount; not guaranteed to be reported rather than estimated. | When D\&B supplies yearly revenue. |
| `organization.financials[].yearlyRevenue[].currency` | String | Currency of the revenue value. | Three-letter currency code; the fixture uses `USD`. | With a yearly revenue value. |
| `organization.financials[].reliabilityDnBCode` | Number | D\&B code for the reliability of the financial value. | Provider-maintained code. | When reliability is supplied. |
| `organization.financials[].reliabilityDescription` | String | Human-readable reliability classification. | The fixture uses `Modelled`. | When reliability is supplied. |
| `organization.financials[].informationScopeDescription` | String or null | Organizational scope covered by the financial value. | Fixtures include `Consolidated`; can be `null`. | When available. |
| `organization.numberOfEmployees[].value` | Number | Employee count for the stated scope. | Count of people. | When employee data is available. |
| `organization.numberOfEmployees[].employeeFiguresDate` | String or null | Date associated with the employee figure. | Fixtures use `YYYY-MM-DD`; can be `null`. | When supplied. |
| `organization.numberOfEmployees[].reliabilityDnBCode` | Number | D\&B code for employee-count reliability. | Provider-maintained code. | When reliability is supplied. |
| `organization.numberOfEmployees[].reliabilityDescription` | String | Human-readable employee-count reliability. | The fixture uses `Modelled`. | When reliability is supplied. |
| `organization.numberOfEmployees[].informationScopeDescription` | String or null | Organizational scope of the employee count. | Fixtures include `Individual` and `Consolidated`; can be `null`. | When available. |
| `organization.defaultCurrency` | String | Default currency associated with the organization record. | Three-letter currency code; the fixture uses `USD`. It does not override the currency attached to a specific amount. | When available. |
| `organization.isStandalone` | Boolean or null | Whether D\&B identifies the company as not belonging to a legal family tree. | `true`, `false`, or `null` when unknown. | When available. |
| `organization.isSmallBusiness` | Boolean or null | D\&B's small-business indicator. | `true`, `false`, or `null` when unknown. This is provider data, not a Lendflow eligibility decision. | When available. |

<Note>
  D\&B's detailed data dictionary and complete `companyinfo_L2_v1` schema require access to the authenticated Direct+ documentation portal. Lendflow passes through provider data, and fixtures show that optional fields can be absent, `null`, an empty array, or an empty object. Integrations should null-check optional paths, tolerate empty collections, and use each accompanying D\&B code description instead of hard-coding meanings from the sample.
</Note>

## Statuses and errors

### Keep provider and Lendflow statuses separate

| Status source | Fields | Meaning |
| - | - | - |
| D\&B data block | `blockStatus[].status` and `blockStatus[].reason` inside `data.commercial_data.dnb.ci_l2` | Whether D\&B processed a requested or supporting provider block. An observed value of `ok` applies only to that block. |
| Lendflow service lifecycle | `data.statuses.dnb.ci_l2` and `data.dates.dnb_ci_l2` | Whether the queued `dnb_ci_l2` service has not started, started, succeeded, or recorded an error, plus its latest date. |
| Data Orchestration lifecycle | `status`, `outcome`, `internal_error`, `started_at`, and `finished_at` on the orchestration log | State and outcome of the full orchestration run. Current orchestration statuses include `started`, `finished`, `error`, `missing-data`, and `paused`. |
| Dashboard compatibility status | The dashboard's commercial-data wrapper | The UI commonly displays `Not yet started`, `Started`, or `Success`, and may display a captured error message. These labels are not D\&B `blockStatus` values. |

### Common failures

| Failure | Cause | What to check |
| - | - | - |
| Service is unavailable or rejected | `dnb_ci_l2` is not enabled for the organization, or the caller cannot enrich the application. | Confirm service access and Lendflow token permissions. |
| Data Orchestration does not start | The template is still a draft, an ID is invalid, or the caller lacks access. | Publish the template and verify `template_id`, `application_id`, optional `stage_id`, and the bearer token. |
| Match validation fails | The business legal name or country is missing, or an optional address, phone, email, or registration value is invalid. | Correct the application data before rerunning the block. |
| No D‑U‑N‑S Number is resolved | D\&B returns no match candidate, a provider match error, or a candidate without an organization D‑U‑N‑S Number. | Improve the legal name and address data, or supply a verified `duns_number`. |
| D\&B authentication fails | Lendflow cannot obtain a D\&B bearer token. | Ask your Lendflow representative to verify the active organization credential or Lendflow-managed credential. |
| D‑U‑N‑S lookup fails | D\&B returns an error from the data-block request. | Read `data.statuses.dnb.ci_l2`; verify the D‑U‑N‑S Number and service entitlement before retrying. |
| Provider block is not `ok` | D\&B reports a different `blockStatus[].status`. | Inspect the matching `reason`. Do not mark the provider block successful solely because the orchestration request was accepted. |
| Data is sparse | D\&B has limited coverage for the matched organization or country. | Treat optional fields as nullable and do not infer zero, false, or an empty string from missing data. |

## FAQ

<AccordionGroup>
  <Accordion title="Do I need to add the Dun & Bradstreet Business Match block first?">
    No. If the application does not already contain `duns_number`, the Company Information service automatically runs `dnb_bm_l1` and uses the first returned candidate's D‑U‑N‑S Number. Add a separate match block only when your workflow needs to evaluate match results independently.
  </Accordion>

  <Accordion title="What happens when the application already has a D‑U‑N‑S Number?">
    Lendflow skips the automatic business-match call and requests `companyinfo_L2_v1` for the stored D‑U‑N‑S Number.
  </Accordion>

  <Accordion title="Does an accepted Data Orchestration request mean the D&B result succeeded?">
    No. The request schedules asynchronous work. Check the Data Orchestration log and `data.statuses.dnb.ci_l2`. Then inspect D\&B's `blockStatus` inside `data.commercial_data.dnb.ci_l2`.
  </Accordion>

  <Accordion title="Why is data.commercial_data.dnb.ci_l2 null?">
    The field remains `null` until Lendflow stores a provider response. Inspect `data.statuses.dnb.ci_l2` to distinguish a pending run from an error. After success, optional D\&B fields inside the payload can still be null, absent, or empty.
  </Accordion>

  <Accordion title="Should I interpret D&B codes without their descriptions?">
    No. D\&B controls its code sets. Store the numeric code when useful, but interpret it with the description returned in the same object and consult the authenticated D\&B Direct+ data dictionary for the complete current catalog.
  </Accordion>

  <Accordion title="Can I send D&B credentials in the execution request?">
    No. Lendflow resolves D\&B credentials server-side. The API request uses only your Lendflow bearer token and the required Lendflow identifiers.
  </Accordion>
</AccordionGroup>
