# Run underwriting on a deal

Opens a deal's underwriting file and lays out version 1 of the scorecard: a `pending` answer for every ACTIVE criterion in the workspace's template, so the tab draws the whole checklist rather than growing it as people answer. ONE per deal — a second start is a 409. Deals page only.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/rows/{rowId}/underwriting`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |
| rowId | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {},
  "params": {
    ":key": "string",
    ":rowId": ""
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "annualRevenueMinor": 1,
    "applicationDate": "string",
    "attorneyReviewSubmittedAt": "string",
    "baseRate": 1.5,
    "checkingAccountSetupAt": "string",
    "closerUserId": 1,
    "closingCostsMinor": 1,
    "createdAt": "string",
    "creditDecisionDate": "string",
    "creditDecisionIsEstimate": true,
    "creditWorthinessDecision": "string",
    "criteriaResults": [
      {
        "criterion": "string",
        "criterionId": "",
        "evaluatedAt": "string",
        "evaluatedBy": "string",
        "evidence": "string",
        "id": "",
        "note": "string",
        "numericValue": "string",
        "source": "string",
        "status": "string",
        "version": "string"
      }
    ],
    "daysToClose": 1,
    "dealRowId": "",
    "debtRefinanceAmountMinor": 1,
    "eligibleLoanAmountMinor": 1,
    "employeeCount": 1,
    "engagementStatus": "string",
    "estimatedClosingDate": "string",
    "evaluationVersion": 1,
    "existingNonReDebtMinor": 1,
    "existingReDebtMinor": 1,
    "ficoScore": 1,
    "fileLocation": "string",
    "finalReviewInitiatedAt": "string",
    "guarantyFeeMinor": 1,
    "id": 1,
    "interestRate": 1.5,
    "losCompleted": true,
    "monthlyPaymentMinor": 1,
    "naicsCode": "string",
    "needsList": "string",
    "notes": "string",
    "onlineApplicationCompleted": true,
    "originationPhase": "string",
    "personalRevolvingBalanceMinor": 1,
    "personalRevolvingLimitMinor": 1,
    "plpNumber": "string",
    "plpNumberReceivedAt": "string",
    "proformaDebtRatio": 1.5,
    "referralFeeSubmittedAt": "string",
    "revolvingUtilizationRatio": 1.5,
    "sbssScore": 1,
    "scorecardCompleted": true,
    "sourceOfLoan": "string",
    "spread": 1.5,
    "startedBy": 1,
    "timeInBusinessYears": 1.5,
    "underwriterUserId": 1,
    "updatedAt": "string",
    "vendorInvoiceProcessedAt": "string",
    "workingCapitalAmountMinor": 1
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
