Skip to main content
POST
/
batch
/
documents
JavaScript
import Morphik from 'morphik';

const client = new Morphik({
  apiKey: 'My API Key',
});

const documents = await client.batch.retrieveDocuments();

console.log(documents);
[
  {
    "content_type": "<string>",
    "external_id": "<string>",
    "filename": "<string>",
    "metadata": {},
    "metadata_types": {},
    "storage_info": {},
    "storage_files": [
      {
        "bucket": "<string>",
        "key": "<string>",
        "version": 1,
        "filename": "<string>",
        "content_type": "<string>",
        "timestamp": "2023-11-07T05:31:56Z"
      }
    ],
    "system_metadata": {},
    "additional_metadata": {},
    "chunk_ids": [
      "<string>"
    ],
    "folder_name": "<string>",
    "end_user_id": "<string>",
    "app_id": "<string>"
  }
]

Headers

authorization
string

Body

application/json

Request model for batch document retrieval.

document_ids
string[]

List of document IDs to retrieve

folder_name

Optional folder scope for the operation. Accepts a single folder name or a list of folder names.

end_user_id
string | null

Optional end-user scope for the operation

Response

Successful Response

content_type
string
required
external_id
string
filename
string | null
metadata
Metadata · object
metadata_types
Metadata Types · object
storage_info
Storage Info · object
storage_files
StorageFileInfo · object[]
system_metadata
System Metadata · object
additional_metadata
Additional Metadata · object
chunk_ids
string[]
folder_name
string | null
end_user_id
string | null
app_id
string | null