Documents

Retrieve

Beta
GET
Retrieve a Document, keying off of either its Vellum-generated ID or its external ID.

Path parameters

idstringRequired
A UUID string identifying this document.

Response

This endpoint returns an object
id
string
last_uploaded_at
datetime
label
string
A human-readable label for the document. Defaults to the originally uploaded file's file name.
document_to_document_indexes
list of objects
external_id
stringOptional
The unique id of this document as it exists in the user's system.
processing_state
enumOptional

The current processing state of the document

  • QUEUED - Queued
  • PROCESSING - Processing
  • PROCESSED - Processed
  • FAILED - Failed
Allowed values: QUEUEDPROCESSINGPROCESSEDFAILED
status
"ACTIVE"Optional

The current status of the document

  • ACTIVE - Active
original_file_url
stringOptional
processed_file_url
stringOptional
metadata
map from strings to anyOptional
A previously supplied JSON object containing metadata that can be filtered on when searching.
GET
1curl https://api.vellum.ai/v1/documents/id \
2 -H "X_API_KEY: <apiKey>"
200Retrieved
1{
2 "id": "id",
3 "last_uploaded_at": "2024-01-15T09:30:00Z",
4 "label": "label",
5 "document_to_document_indexes": [
6 {
7 "id": "id",
8 "document_index_id": "document_index_id",
9 "indexing_state": "AWAITING_PROCESSING"
10 }
11 ],
12 "external_id": "external_id",
13 "processing_state": "QUEUED",
14 "status": "ACTIVE",
15 "original_file_url": "original_file_url",
16 "processed_file_url": "processed_file_url",
17 "metadata": {
18 "metadata": {
19 "key": "value"
20 }
21 }
22}