# Add a debt schedule to a record

Start a business debt schedule on a record. The body carries the whole content plus the revision it is written against; a stale revision is refused rather than overwriting somebody else's edit.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/rows/{rowId}/debt-schedules`

## Parameters

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

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "content": {
      "as_of_date": "string",
      "currency": "string",
      "entries": [
        "string"
      ],
      "no_debt": true
    },
    "revision": 1
  },
  "params": {
    ":key": "string",
    ":rowId": ""
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "content": "string",
    "created_at": "string",
    "document_id": "",
    "id": "",
    "revision": 1,
    "source": "string",
    "source_detail": "string",
    "status": "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"
}
```
