Skip to main content
POST
/
v1
/
documents
Create document
curl --request POST \
  --url https://api.clinikapi.com/v1/documents \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "type": "<string>",
  "patientId": "<string>",
  "practitionerId": "<string>",
  "title": "<string>",
  "sections": [
    {
      "title": "<string>",
      "text": "<string>",
      "code": "<string>",
      "resourceIds": [
        "<string>"
      ],
      "authorId": "<string>",
      "sections": [
        {
          "title": "<string>",
          "code": "<string>",
          "text": "<string>"
        }
      ]
    }
  ],
  "category": [
    "<string>"
  ],
  "encounterId": "<string>",
  "date": "2023-11-07T05:31:56Z",
  "attester": [
    {
      "time": "2023-11-07T05:31:56Z",
      "partyId": "<string>"
    }
  ],
  "custodianId": "<string>",
  "relatesTo": [
    {
      "targetId": "<string>"
    }
  ],
  "event": [
    {
      "code": [
        {
          "system": "<string>",
          "code": "<string>",
          "display": "<string>"
        }
      ],
      "period": {
        "start": "<string>",
        "end": "<string>"
      },
      "detailIds": [
        "<string>"
      ]
    }
  ]
}
'

Authorizations

x-api-key
string
header
required

Your ClinikAPI secret key (clk_live_* or clk_test_*)

Body

application/json
status
enum<string>
required
Available options:
preliminary,
final,
amended
type
string
required

Document type (discharge-summary, referral-letter, care-plan, etc.)

Maximum string length: 100
patientId
string
required
practitionerId
string
required
title
string
required
Maximum string length: 500
sections
object[]
required
Required array length: 1 - 50 elements
category
string[]

Document categories for classification

Maximum string length: 200
encounterId
string
date
string<date-time>
confidentiality
enum<string>

N (normal), R (restricted), V (very restricted)

Available options:
N,
R,
V
attester
object[]

Who attested to the accuracy of the document

custodianId
string

Organization maintaining the document

relatesTo
object[]

Relationships to other compositions/documents

event
object[]

Clinical services being documented

Response

201

Document created