# Cancel a document request

Withdraws one document request — we are no longer waiting on this paper. No body; `id` is the request. Only an OPEN request can move, so cancelling one already fulfilled or cancelled is a not-found. It drops off `get_document-requests` afterwards. Reach for `post_document-requests_id_fulfil` instead when the file actually arrived.

Access class: `workspace`.

## Endpoint

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

## Parameters

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

## Request body

Content type: `application/json`.

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