# Set an underwriting rule set's criteria

Records a person's scorecard answers into the CURRENT version and answers that whole version, refreshed. Each entry names a `criterionId` and may carry `status`, `numericValue` and `note`; each field is independently optional, so a save carrying only a figure keeps the status beside it. An answer given here is stamped manual with who gave it, which is what makes a later `evaluate` leave it alone. A version is a PASS of the machine, not a keystroke, so this does not mint one. Deals page only.

Access class: `def:read`.

## Endpoint

`PUT /v1/definitions/{key}/underwriting/{id}/criteria`

## Parameters

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

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "answers": [
      {
        "criterionId": 1,
        "note": "string",
        "numericValue": 1.5,
        "status": "string"
      }
    ]
  },
  "params": {
    ":id": "string",
    ":key": "string"
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": [
    {
      "criterion": {
        "active": "string",
        "autoSource": "string",
        "category": "string",
        "comparison": "string",
        "createdAt": "string",
        "id": "",
        "key": "string",
        "label": "string",
        "sortOrder": "string",
        "threshold": "string",
        "updatedAt": "string",
        "valueKind": "string"
      },
      "criterionId": 1,
      "evaluatedAt": "string",
      "evaluatedBy": 1,
      "evidence": "string",
      "id": 1,
      "note": "string",
      "numericValue": 1.5,
      "source": "string",
      "status": "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"
}
```
