# Seed the default underwriting rule set

Write the default credit box - twelve rules over bank statements, tax returns, credit reports and the deal's own cells - and publish it. Idempotent: a second call answers the set already there with created=false, and never overwrites an edit. Reach for it when a workspace has no rule set yet.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/workspace/underwriting/rule-sets/seed`

## Request body

Content type: `application/json`.

```json
{
  "body": {},
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "created": true,
    "ruleSet": {
      "appliesToProduct": "string",
      "appliesToStage": "string",
      "createdAt": "string",
      "createdByAccountId": "",
      "description": "string",
      "hasUnpublishedChanges": true,
      "id": 1.5,
      "key": "string",
      "name": "string",
      "publishedAt": "string",
      "publishedByAccountId": "",
      "publishedVersion": 1.5,
      "rules": [
        {
          "active": true,
          "condition": "string",
          "createdAt": "string",
          "id": 1.5,
          "key": "string",
          "name": "string",
          "outcome": "string",
          "reasonTemplate": "string",
          "setId": 1.5,
          "sortOrder": 1.5,
          "sourceText": "string",
          "updatedAt": "string",
          "weight": 1.5
        }
      ],
      "seeded": true,
      "status": "string",
      "updatedAt": "string"
    }
  }
}
```

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