Skip to main content
Use this endpoint to retrieve a list of structured clinical documents matching your filter criteria. All query parameters are optional — omitting them returns all documents visible to your tenant. Combine filters to narrow results, for example all finalized discharge summaries for a specific patient.

Request

GET https://api.clinikapi.com/v1/documents

Headers

x-api-key
string
required
Your ClinikAPI secret key (clk_live_* or clk_test_*).

Query parameters

patientId
string
Filter documents to a specific patient (e.g. pt_abc123).
practitionerId
string
Filter by the practitioner who authored the document (e.g. prac_def456).
type
string
Filter by document type (e.g. discharge-summary, referral-letter, care-plan).
status
string
Filter by document status. One of: preliminary, final, amended.
dateFrom
string
Return documents with a date on or after this value. Format: YYYY-MM-DD.
dateTo
string
Return documents with a date on or before this value. Format: YYYY-MM-DD.
sort
string
Sort order. Prefix with - for descending. Example: -date returns the most recent documents first.
page
number
Page number for paginated results. Defaults to 1.
pageSize
number
Number of results per page. Defaults to 20. Maximum 100.

Response

Returns 200 OK with an array of documents and pagination metadata.
data
array
Array of document objects matching the query. Each item contains the same fields as the single-document read endpoint.
meta.total
number
Total number of documents matching the query across all pages.
meta.page
number
Current page number.
meta.pageSize
number
Number of results per page.
meta
object
Standard response metadata including requestId, timestamp, status, and rate-limit fields.

Examples

curl

# Finalized discharge summaries for a patient
curl "https://api.clinikapi.com/v1/documents?patientId=pt_abc123&type=discharge-summary&status=final&sort=-date" \
  -H "x-api-key: clk_live_abc123"

TypeScript SDK

import { Clinik } from '@clinikapi/sdk';

const clinik = new Clinik(process.env.CLINIKAPI_SECRET_KEY!);

const { data } = await clinik.documents.search({
  patientId: 'pt_abc123',
  type: 'discharge-summary',
  status: 'final',
  sort: '-date',
});