# Request documents from a record's contact

Records that a document is owed on one record: `documentType` (required), an optional `note` and an optional RFC 3339 `dueAt`. A second OPEN ask for the same document on the same record is a 409 that NAMES the ask already standing, so the caller can chase or withdraw that one. IT SENDS NOTHING — this writes down the need; asking the merchant for it is the stipulations route.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/rows/{rowId}/document-requests`

## Parameters

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

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "documentType": "string",
    "dueAt": "string",
    "note": "string"
  },
  "params": {
    ":key": "string",
    ":rowId": ""
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "cancelledAt": "string",
    "documentType": "string",
    "dueAt": "string",
    "fulfilledAt": "string",
    "fulfilledBy": 1,
    "fulfilledFileId": "",
    "id": "",
    "note": "string",
    "periods": [
      {
        "label": "string",
        "periodEnd": "string",
        "periodStart": "string"
      }
    ],
    "requestedAt": "string",
    "requestedBy": 1,
    "rowId": "",
    "sentAt": "string",
    "sentMedium": "string",
    "sentMessageId": 1,
    "sentTo": "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"
}
```
