# Fulfil a document request

Closes one document request because the paper ARRIVED. Body: `fileId`, required — the file must already be pinned to the same record the ask was raised on, and another workspace's file cannot be named. Only an OPEN request can move, so fulfilling twice is a not-found. Answers the settled request. Upload the file first, then name it here; `post_document-requests_id_cancel` is for the ask that is simply dropped.

Access class: `workspace`.

## Endpoint

`POST /v1/document-requests/{id}/fulfil`

## Parameters

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

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "fileId": ""
  },
  "params": {
    ":id": "string"
  },
  "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"
}
```
