v1.0

Underwriting

Deal-scoped underwriting tool endpoints

Run underwriting analyses on deals using integrated tools: SmartScrub bank analysis, CLEAR background checks, Equifax/Experian credit reports, DataMerch scrubs, and AI-powered merchant verification.

All endpoints are deal-scoped under /api/public/v1/deals/{dealId}/underwriting/.

List Available Tools

GET /api/public/v1/deals/{dealId}/underwriting/tools

Returns the catalog of available underwriting tools with their parameter requirements.

Required Scope: underwriting:read

Response:

{
  "tools": [
    {
      "tool": "smartscrub",
      "name": "SmartScrub Bank Analysis",
      "description": "Analyzes bank statements to classify transactions, detect MCA positions, and calculate financial metrics.",
      "requiredParams": [],
      "optionalParams": ["skipParsing"]
    },
    {
      "tool": "background_check",
      "name": "CLEAR Background Check",
      "description": "Thomson Reuters CLEAR background check for businesses or individuals.",
      "requiredParams": ["entityType", "entityId"],
      "optionalParams": ["clearGroupId"]
    },
    {
      "tool": "credit_check",
      "name": "Credit Report",
      "description": "Pull a business or consumer credit report via Equifax or Experian.",
      "requiredParams": ["provider", "queryInput"],
      "optionalParams": ["reportType", "endpointType"]
    },
    {
      "tool": "merchant_scrub",
      "name": "DataMerch Merchant Scrub",
      "description": "Searches the DataMerch database for merchant defaults, liens, and negative records.",
      "requiredParams": ["query"],
      "optionalParams": []
    },
    {
      "tool": "merchant_enrichment",
      "name": "AI Merchant Verification",
      "description": "AI-powered business verification and enrichment.",
      "requiredParams": [],
      "optionalParams": []
    }
  ]
}

Trigger Analysis Tool

POST /api/public/v1/deals/{dealId}/underwriting/analyze

Trigger an underwriting analysis tool for a deal. The deal must have a linked submission for tools that require documents (SmartScrub, credit checks).

Required Scope: underwriting:trigger

Request Body

FieldTypeRequiredDescription
toolstringYesOne of: smartscrub, background_check, credit_check, merchant_scrub, merchant_enrichment
paramsobjectNoTool-specific parameters (see below)

Tool Parameters

smartscrub:

ParamTypeDescription
skipParsingbooleanSkip PDF parsing, re-classify only

background_check:

ParamTypeRequiredDescription
entityTypestringYesbusiness or person
entityIdstringYesCLEAR entity ID
clearGroupIdstringNoGroup ID for full report

credit_check:

ParamTypeRequiredDescription
providerstringYesequifax or experian
queryInputstringYesBIN or business name
reportTypestringNoProvider-specific type
endpointTypestringNobusiness or consumer (default: business)

merchant_scrub:

ParamTypeRequiredDescription
querystringYesEIN or business name

merchant_enrichment: No additional parameters required.

Response 202 Accepted

{
  "id": "sess_abc123",
  "tool": "smartscrub",
  "status": "processing",
  "message": "SmartScrub analysis started"
}

cURL

curl -X POST https://api.smartmca.com/api/public/v1/deals/deal_123/underwriting/analyze \
  -H "Authorization: Bearer smca_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "background_check",
    "params": {
      "entityType": "business",
      "entityId": "clear_biz_456"
    }
  }'

JavaScript

const res = await fetch(
  'https://api.smartmca.com/api/public/v1/deals/deal_123/underwriting/analyze',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer smca_live_...',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      tool: 'credit_check',
      params: { provider: 'equifax', queryInput: '12-3456789' },
    }),
  }
);

Python

import requests

resp = requests.post(
    'https://api.smartmca.com/api/public/v1/deals/deal_123/underwriting/analyze',
    headers={'Authorization': 'Bearer smca_live_...'},
    json={
        'tool': 'merchant_scrub',
        'params': {'query': '12-3456789'}
    },
)

Get Analysis Status

GET /api/public/v1/deals/{dealId}/underwriting/analyses/{analysisId}

Returns the status and result of a specific analysis. The analysisId is the ID returned by the trigger endpoint.

Required Scope: underwriting:read

Response:

{
  "id": "rpt_abc123",
  "tool": "background_check",
  "status": "completed",
  "createdAt": "2026-03-04T10:00:00Z",
  "completedAt": "2026-03-04T10:00:30Z",
  "result": {
    "reportType": "business",
    "entityName": "Acme Coffee LLC",
    "pdfUrl": "https://..."
  }
}

Get Aggregated Results

GET /api/public/v1/deals/{dealId}/underwriting/results

Returns combined results from all underwriting tools run against this deal.

Required Scope: underwriting:read

Response:

{
  "dealId": "deal_123",
  "submissionId": "sub_456",
  "merchantId": "merch_789",
  "smartscrub": {
    "status": "completed",
    "summary": { ... }
  },
  "backgroundChecks": {
    "clear": [ ... ]
  },
  "creditChecks": {
    "equifax": [ ... ],
    "experian": [ ... ]
  },
  "merchantScrub": {
    "datamerch": [ ... ]
  },
  "merchantEnrichment": { ... }
}

Select Documents

POST /api/public/v1/deals/{dealId}/underwriting/documents

Select which uploaded documents to use for underwriting analysis.

Required Scope: underwriting:trigger

FieldTypeRequiredDescription
documentIdsstring[]YesDocument IDs to select

List Documents

GET /api/public/v1/deals/{dealId}/underwriting/documents

List documents linked to this dealโ€™s submission.

Required Scope: underwriting:read

Response:

{
  "dealId": "deal_123",
  "submissionId": "sub_456",
  "documents": [
    {
      "id": "doc_789",
      "fileName": "january-statement.pdf",
      "documentType": "bankStatement",
      "status": "parsed",
      "fileUrl": "https://...",
      "createdAt": "2026-03-01T08:00:00Z"
    }
  ]
}

Scopes

ActionScope
List tools, documents, get resultsunderwriting:read
Trigger analyses, select documentsunderwriting:trigger