# Change credit-memos id

Edits a credit memo, DRAFTS only: the store puts that in the WHERE, so a memo already submitted reads as a not-found rather than being quietly rewritten under its reviewer. Body, all optional: `title`, `memoType`, any of the nine narrative panes, `requestedAmountMinor`, `recommendedAmountMinor` (or `clearRecommendedAmount: true` to recommend no figure at all), `recommendedRate`, `recommendedTermMonths`, `recommendedProduct`, `recommendedDecision`, `recommendedConditions`, `expiresAt`. A memo in review is changed by rejecting it and writing its successor, not by patching.

Access class: `workspace`.

## Endpoint

`PATCH /v1/credit-memos/{id}`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "businessOverview": "string",
    "clearRecommendedAmount": true,
    "collateralAnalysis": "string",
    "executiveSummary": "string",
    "expiresAt": "string",
    "financialAnalysis": "string",
    "industryAnalysis": "string",
    "memoType": "string",
    "ownershipAnalysis": "string",
    "recommendation": "string",
    "recommendedAmountMinor": 1,
    "recommendedConditions": [
      "string"
    ],
    "recommendedDecision": "string",
    "recommendedProduct": "string",
    "recommendedRate": "string",
    "recommendedTermMonths": 1,
    "requestedAmountMinor": 1,
    "riskAssessment": "string",
    "strengthsWeaknesses": "string",
    "title": "string"
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "aiGenerated": true,
    "approvalNotes": "string",
    "approvedAt": "string",
    "approverUserId": 1,
    "attachmentIds": [
      1
    ],
    "authorUserId": 1,
    "businessOverview": "string",
    "collateralAnalysis": "string",
    "createdAt": "string",
    "currency": "string",
    "dealRowId": "",
    "definitionId": "",
    "detail": {},
    "executiveSummary": "string",
    "expiresAt": "string",
    "facilityId": 1,
    "financialAnalysis": "string",
    "generationModel": "string",
    "id": 1,
    "industryAnalysis": "string",
    "memoType": "string",
    "ownershipAnalysis": "string",
    "previousMemoId": 1,
    "recommendation": "string",
    "recommendedAmountMinor": 1,
    "recommendedConditions": [
      "string"
    ],
    "recommendedDecision": "string",
    "recommendedProduct": "string",
    "recommendedRate": "string",
    "recommendedTermMonths": 1,
    "rejectionReason": "string",
    "requestedAmountMinor": 1,
    "reviewNotes": "string",
    "reviewedAt": "string",
    "reviewerUserId": 1,
    "riskAssessment": "string",
    "riskProfileId": 1,
    "status": "string",
    "strengthsWeaknesses": "string",
    "title": "string",
    "updatedAt": "string",
    "version": 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"
}
```
