Minerva API
API referenceDocuments

Update a document

PATCH/documents/{id}

Rename the document and/or set its metadata. metadata merges: only the listed fields change, and a null or empty value clears that field; fields you leave out keep their value. Take field ids from GET /metadata-fields. An unknown or inactive fieldId refuses the whole request with 422 (details.fieldIds) and nothing is written.

Requires an API key with one of these roles: admin, editor.

Authorization

bearerAuth
AuthorizationBearer <token>

An API key created in Settings → API Keys.

In: header

Path Parameters

id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "fileName": "string",    "createdAt": "2019-08-24T14:15:22Z",    "numPages": 0,    "reference": {      "property1": "string",      "property2": "string"    },    "status": "uploaded",    "durationSeconds": 0,    "error": "parse_failed",    "metadata": [      {        "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",        "name": "string",        "value": "string"      }    ],    "dataGroups": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string"      }    ],    "path": "string",    "isActive": true,    "isInProgress": true,    "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f"  },  "meta": {    "requestId": "string",    "timestamp": "string"  }}