# Change files id

Say what a document IS: documentType from the closed vocabulary (bank_statement, tax_return, credit_report, contract, … other), the span it covers as YYYY-MM-DD periodStart/periodEnd, and statementStatus (new, submitted or fraud) on a bank statement. Metadata only — nothing is sent to anybody and no storage is needed. Each field is read as given rather than merged, so an empty string puts the file back to unclassified; a word outside the vocabulary is refused rather than stored.

Access class: `workspace`.

## Endpoint

`PATCH /v1/files/{id}`

## Parameters

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

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "documentType": "string",
    "periodEnd": "string",
    "periodStart": "string",
    "statementStatus": "string"
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "contentType": "string",
    "createdAt": "string",
    "documentType": "string",
    "id": "",
    "name": "string",
    "rowId": "",
    "sizeBytes": 1.5,
    "source": "string",
    "uploadedBy": 1.5
  }
}
```

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