# Record a credit record

Record one credit record on this deal: a credit memo, a DECISION (approve, decline, counter) or a piece of business research. An approval names an amount, a decline names a reason and a counter names its counter - each enforced by the schema, not by a validator one path can skip. A decision that is not `pending` rings the deal's people.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/rows/{rowId}/credit-records/{family}`

## Parameters

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

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "activeStatus": "string",
    "aiGenerated": true,
    "approvedAmountMinor": 1,
    "approvedFactorRate": 1.5,
    "approvedTermMonths": 1,
    "attachmentIds": [
      1
    ],
    "businessOverview": "string",
    "collateralAnalysis": "string",
    "companyPhone": "string",
    "companyWebsite": "string",
    "conditions": [
      "string"
    ],
    "conditionsMet": true,
    "counterAmountMinor": 1,
    "counterFactorRate": 1.5,
    "counterTermMonths": 1,
    "courtRecords": "string",
    "creditMemoId": 1,
    "currency": "string",
    "decisionType": "string",
    "declineCode": "string",
    "declineReason": "string",
    "executiveSummary": "string",
    "expiresAt": "string",
    "externalNotes": "string",
    "financialAnalysis": "string",
    "fullAddress": "string",
    "generatedBy": "string",
    "generationModel": "string",
    "goodStanding": "string",
    "industryAnalysis": "string",
    "initialFilingDate": "string",
    "internalNotes": "string",
    "legalActions": "string",
    "memoType": "string",
    "name": "string",
    "ownerCourtRecords": "string",
    "ownerLegalIssues": "string",
    "ownerName": "string",
    "ownershipAnalysis": "string",
    "paymentAmountMinor": 1,
    "previousMemoId": 1,
    "recommendation": "string",
    "recommendedAmountMinor": 1,
    "recommendedConditions": [
      "string"
    ],
    "recommendedDecision": "string",
    "recommendedProduct": "string",
    "recommendedRate": "string",
    "recommendedTermMonths": 1,
    "requestedAmountMinor": 1,
    "researchNotes": "string",
    "riskAssessment": "string",
    "riskProfileId": 1,
    "source": "string",
    "sources": [
      "string"
    ],
    "state": "string",
    "status": "string",
    "strengthsWeaknesses": "string",
    "title": "string"
  },
  "params": {
    ":family": "string",
    ":key": "string",
    ":rowId": ""
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{}
```

### 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"
}
```
