> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nextlevelmca.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check a deal’s business in DataMerch

> Looks the business up in DataMerch with the workspace’s own credentials and stores the result on the deal. Searches by the EIN on file, or by legal name when there is no EIN (name hits are possible matches, not confirmed; compare city and state). An identical check from the last 24 hours is returned with `cached: true` unless `force` is set. Fails with `datamerch_not_connected` when the workspace has not connected DataMerch in Settings → Integrations. A vendor outage or rejected credentials come back as a check with `error` set, not as an HTTP error.



## OpenAPI

````yaml /openapi/public-v1.json post /v1/deals/{id}/datamerch/check
openapi: 3.0.0
info:
  title: NextLevel MCA Public API
  description: >-
    REST API for the NextLevel MCA deal platform. Objects flow Businesses →
    People → Deals → Submissions → Offers → Advances.


    **Authentication.** Send `Authorization: Bearer <key>` with an API key
    (`nlmca_live_…`, created in Settings → Developers) or an OAuth access token.
    Keys are scoped to one location.


    **Conventions.** JSON only. Cursor pagination (`limit` ≤ 100, `cursor` from
    `meta.next_cursor`). Every success is `{ data, meta }`; every error is `{
    error: { type, message, code, param, request_id } }`. POST endpoints accept
    `Idempotency-Key` (24h replay). Rate limit 300 requests/min per credential
    (`X-RateLimit-*` headers).


    **Scopes.** Keys with no scopes have all of them. Otherwise:

    - `businesses:read` — Read businesses and their notes, tasks and activity

    - `businesses:write` — Create and update businesses, notes and tasks

    - `people:read` — Read people (contacts and owners)

    - `people:write` — Create and update people

    - `deals:read` — Read deals, submissions and the pipeline

    - `deals:write` — Create and update deals, move stages

    - `documents:read` — Read documents and statement analysis

    - `documents:write` — Upload documents and request documents from merchants

    - `lenders:read` — Read lenders, criteria and lender matches

    - `lenders:write` — Create and update lenders and criteria

    - `submissions:write` — Submit deals to lenders and withdraw submissions

    - `offers:read` — Read offers

    - `offers:write` — Log and update offers, set the primary offer

    - `advances:read` — Read funded advances and renewal flags

    - `advances:write` — Update advances

    - `portal:send` — Generate and send merchant portal links

    - `webhooks:manage` — Manage webhook subscriptions
  version: '1.0'
  contact: {}
servers:
  - url: https://api.nextlevelmca.com
    description: Production
security:
  - bearer: []
tags:
  - name: Businesses
    description: Merchant businesses and their notes, tasks and activity
  - name: People
    description: Contacts and owners. Phone lookups normalise to E.164.
  - name: Deals
    description: Deals, stage moves, renewals and the pipeline
  - name: Documents
    description: Documents, presigned uploads, document requests and statement analysis
  - name: Lenders
    description: Lenders and their criteria
  - name: Lender matches
    description: Criteria-driven lender matching for a deal
  - name: Submissions
    description: Sending deals to lenders
  - name: Offers
    description: Lender offers and the primary offer
  - name: Advances
    description: Funded advances and renewal readiness
  - name: Merchant portal
    description: Magic links for the merchant portal
  - name: Webhooks
    description: Outbound event subscriptions
paths:
  /v1/deals/{id}/datamerch/check:
    post:
      tags:
        - DataMerch
      summary: Check a deal’s business in DataMerch
      description: >-
        Looks the business up in DataMerch with the workspace’s own credentials
        and stores the result on the deal. Searches by the EIN on file, or by
        legal name when there is no EIN (name hits are possible matches, not
        confirmed; compare city and state). An identical check from the last 24
        hours is returned with `cached: true` unless `force` is set. Fails with
        `datamerch_not_connected` when the workspace has not connected DataMerch
        in Settings → Integrations. A vendor outage or rejected credentials come
        back as a check with `error` set, not as an HTTP error.
      operationId: data_merch_check
      parameters:
        - name: id
          required: true
          in: path
          description: Deal id
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataMerchCheckCreateDto'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    $ref: '#/components/schemas/DataMerchCheckDto'
                  meta:
                    $ref: '#/components/schemas/EmptyMetaDto'
        '400':
          description: Validation failed. `error.param` names the field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelopeDto'
        '401':
          description: Missing, invalid, expired or revoked credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelopeDto'
        '403':
          description: Credential lacks the scope, or the role lacks the permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelopeDto'
        '404':
          description: Resource not found in this location.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelopeDto'
        '429':
          description: Rate limit exceeded. See `X-RateLimit-*` and `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelopeDto'
      security:
        - bearer: []
components:
  schemas:
    DataMerchCheckCreateDto:
      type: object
      properties:
        query_type:
          type: string
          enum:
            - ein
            - name
          description: >-
            What to search by. Omit to use the 9-digit EIN on file, falling back
            to the legal name.
        query:
          type: string
          description: >-
            Name keywords for a name search (default: the legal name on file).
            Ignored for an EIN search.
          maxLength: 120
        force:
          type: boolean
          description: >-
            Ask DataMerch again even when an identical check ran in the last 24
            hours.
          default: false
    DataMerchCheckDto:
      type: object
      properties:
        id:
          type: string
          description: Check id.
        query_type:
          type: string
          enum:
            - ein
            - name
          description: Whether the lookup used the EIN or name keywords.
        query_label:
          type: string
          description: >-
            Human label of what was sent, EIN masked, e.g. `EIN ••-•••1234` or
            `name "Acme LLC"`.
        matched:
          type: boolean
          description: True when DataMerch returned at least one merchant.
        match_count:
          type: number
          description: Merchants returned (DataMerch caps this at 5).
        note_count:
          type: number
          description: Notes across every merchant returned.
        categories:
          description: Distinct note categories across the matches.
          type: array
          items:
            type: string
        merchants:
          description: >-
            The merchants DataMerch returned. A name search can return
            look-alikes: compare city and state.
          type: array
          items:
            $ref: '#/components/schemas/DataMerchMerchantDto'
        error:
          type: string
          nullable: true
          description: >-
            Set when DataMerch could not be reached or rejected the credentials;
            `matched` is false then.
        checked_at:
          type: string
          description: ISO 8601 UTC.
        checked_by_name:
          type: string
          nullable: true
          description: Team member who ran it, or null for an automatic check.
        cached:
          type: boolean
          description: >-
            True when an identical check from the last 24 hours was returned
            instead of a new call.
      required:
        - id
        - query_type
        - query_label
        - matched
        - match_count
        - note_count
        - categories
        - merchants
        - error
        - checked_at
        - checked_by_name
        - cached
    EmptyMetaDto:
      type: object
      properties: {}
    ErrorEnvelopeDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/PublicErrorDto'
      required:
        - error
    DataMerchMerchantDto:
      type: object
      properties:
        fein:
          type: string
          nullable: true
          description: EIN, masked to the last four digits.
        legal_name:
          type: string
          nullable: true
        dba:
          type: string
          nullable: true
        address:
          type: string
          nullable: true
        street1:
          type: string
          nullable: true
        street2:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        business_phone:
          type: string
          nullable: true
        business_startdate:
          type: string
          nullable: true
          description: Business start date as DataMerch reports it.
        industry:
          type: string
          nullable: true
        notes:
          description: Notes funders have filed on this merchant, as returned.
          type: array
          items:
            $ref: '#/components/schemas/DataMerchNoteDto'
      required:
        - fein
        - legal_name
        - dba
        - address
        - street1
        - street2
        - city
        - state
        - business_phone
        - business_startdate
        - industry
        - notes
    PublicErrorDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - validation_error
            - authentication_error
            - permission_error
            - not_found
            - conflict
            - rate_limit_error
            - api_error
        message:
          type: string
          description: Human-readable explanation, safe to show to an operator or an agent.
        code:
          type: string
          description: >-
            Stable machine-readable code, e.g. `missing_scope`,
            `duplicate_business`.
        param:
          type: string
          description: Request field the error refers to, when applicable.
        request_id:
          type: string
          description: Echo of the `X-Request-Id` header. Quote it when contacting support.
      required:
        - type
        - message
        - request_id
    DataMerchNoteDto:
      type: object
      properties:
        category:
          type: string
          nullable: true
          description: >-
            Category set by the funder who added the note, e.g. "Slow Pay",
            "Default".
        note:
          type: string
          nullable: true
          description: Note text.
        created_at:
          type: string
          nullable: true
          description: When the note was added, as DataMerch reports it.
        added_by:
          type: string
          nullable: true
          description: Who added it, when DataMerch names the contributor.
      required:
        - category
        - note
        - created_at
        - added_by
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key or JWT
      type: http
      description: API key (`nlmca_live_…`) or OAuth access token

````

## Related topics

- [DataMerch status for a deal](/api-reference/datamerch/datamerch-status-for-a-deal.md)
- [Changelog](/changelog/changelog.md)
- [AI assistants (MCP)](/mcp/overview.md)
