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

# DataMerch Business Search

## DataMerch Business Search

DataMerch Business Search checks a business against DataMerch merchant records and returns reported merchant information and notes. The **DataMerch** Workflow Builder block exposes the `data_merch` service for business entities.

## Requirements

| Application field | Requirement | Notes |
| - | - | - |
| EIN | Conditional | Required unless a business legal name is available; used as the preferred company identifier. |
| Business legal name | Conditional | Required when no EIN is available. |

## Run DataMerch Business Search

1. Call [Enrich Business Credit Application](/api-reference/workflow-management/enrich-business-credit-application).
2. Set `provider` to `data_merch`.
3. Include the applicable underwriting `stage_id` when required by the workflow.
4. Confirm that the response contains `data.onqueue: true`.
5. Poll [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) with `services[]=data_merch`.

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

The result appears at `commercial_data.data_merch`, the latest lifecycle message appears at `statuses.data_merch`, and the sanitized request appears at `request_data.data_merch`.

<Note>
  DataMerch is not included in the current Data Orchestration service catalog. Run it through an underwriting Workflow Builder block or the application enrichment API.
</Note>

## What the service returns

| Response area | Meaning |
| - | - |
| Response array | Zero or more matched DataMerch merchant records. |
| `merchant` | Business identity and DataMerch history for one match. |
| `merchant.notes` | Notes submitted to DataMerch, including category, source, and creation time. |

## Representative response

```json theme={"system"}
[
  {
    "merchant": {
      "dba": null,
      "city": "AUSTIN",
      "fein": "12-3456789",
      "state": "TX",
      "industry": null,
      "legal_name": "EXAMPLE BUSINESS LLC",
      "business_startdate": null,
      "notes": [
        {
          "note": {
            "note": "SANITIZED EXAMPLE",
            "added_by": "Example Reporter",
            "category": "Default Account",
            "created_at": "2024-08-14T14:31:30.547Z"
          }
        }
      ]
    }
  }
]
```

## Response attributes

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `[]` | Array | Matched merchant records. | Empty or populated array. | On a successful search. |
| `[].merchant` | Object | One matched merchant. | Provider object. | For each match. |
| `[].merchant.legal_name` | String or null | Merchant legal name. | Provider text. | When available. |
| `[].merchant.dba` | String or null | Doing-business-as name. | Provider text. | When available. |
| `[].merchant.fein` | String or null | Federal employer identification number. | Formatted identifier; treat as sensitive. | When available. |
| `[].merchant.city` | String or null | Merchant city. | Provider text. | When available. |
| `[].merchant.state` | String or null | Merchant state. | State code in the current fixture. | When available. |
| `[].merchant.industry` | String or null | Provider-reported industry. | Provider text. | When available. |
| `[].merchant.business_startdate` | String or null | Reported business start date. | Provider-controlled date text. | When available. |
| `[].merchant.notes` | Array | DataMerch notes associated with the merchant. | Zero or more wrapper objects. | When notes exist. |
| `[].merchant.notes[].note.category` | String | Note category. | Provider-controlled category. | For each note. |
| `[].merchant.notes[].note.added_by` | String | Organization that submitted the note. | Provider text. | For each note when supplied. |
| `[].merchant.notes[].note.created_at` | String | Note creation timestamp. | ISO 8601 in the current fixture. | For each note. |

## Errors and statuses

`statuses.data_merch` describes the Lendflow request lifecycle. A provider authentication error can include HTTP `401` and `Not Authorized`; verify the client's DataMerch credentials. A response containing `error` is stored for troubleshooting and marks the request as failed.

## FAQ

<AccordionGroup>
  <Accordion title="Does DataMerch search by EIN or business name?">
    Lendflow uses the EIN by default. If no EIN is stored, it uses the business legal name.
  </Accordion>

  <Accordion title="Are DataMerch credentials returned in request data?">
    No. Lendflow treats the authentication token and key as sensitive and obfuscates them.
  </Accordion>

  <Accordion title="Can this service run in Data Orchestration?">
    It is not included in the current Data Orchestration service catalog.
  </Accordion>
</AccordionGroup>
