---
title: "Update a Note record"
method: PATCH
path: "/main/DocumentReference/{id}"
tags: ["DocumentReference"]
---

# Update a Note record

`PATCH /main/DocumentReference/{id}`

## Request

- Base URL: `https://au-api.halaxy.com`
- URL: `https://au-api.halaxy.com/main/DocumentReference/{id}`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `/main/oauth/token`

Partially update an existing Note record

## Path parameters

- `id` string, required

## Request body

- DocumentReference: Create a new Note record
  - `masterIdentifier` FhirIdentifier
    - `use` 'usual' | 'official' | 'temp' | 'secondary' | 'old' | 'null', nullable
    - `type` FhirCodeableConcept
      - `coding` FhirCoding[]: defined by a terminology system
        - `system` string, uri, nullable: Identity of the terminology system
        - `code` string, nullable: Symbol in syntax defined by the system
        - `display` string, nullable: Representation defined by the system
        - `userSelected` boolean, nullable: If this coding was chosen directly by the user
        - `id` string, nullable: ID of the FHIR element (optional)
      - `text` string, nullable: Plain text representation of the concept
      - `id` string, nullable: ID of the FHIR element (optional)
    - `system` string, nullable: The namespace for the identifier value
    - `value` string, nullable: The unique identifier
    - `period` FhirPeriodDateTime
      - `start` string, date-time, nullable
      - `end` string, date-time, nullable
      - `id` string, nullable: ID of the FHIR element (optional)
    - `assigner` FhirReference
      - `reference` string, required: The URL (relative or absolute) to the resource being referenced
      - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'ValueSet' | 'ValueSetConcept' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable: The type of resource being referenced
      - `id` string, nullable: ID of the FHIR element (optional)
    - `id` string, nullable: ID of the FHIR element (optional)
  - `status` 'current' | 'superseded': The status of the document reference
  - `docStatus` 'preliminary' | 'final', required: The status of the clinical note - preliminary for Draft, final for Published
  - `type` FhirCodeableConcept
    - `coding` FhirCoding[]: defined by a terminology system
      - `system` string, uri, nullable: Identity of the terminology system
      - `code` string, nullable: Symbol in syntax defined by the system
      - `display` string, nullable: Representation defined by the system
      - `userSelected` boolean, nullable: If this coding was chosen directly by the user
      - `id` string, nullable: ID of the FHIR element (optional)
    - `text` string, nullable: Plain text representation of the concept
    - `id` string, nullable: ID of the FHIR element (optional)
  - `category` FhirCodeableConcept[]: Categorization of the clinical note
    - `coding` FhirCoding[]: defined by a terminology system
      - `system` string, uri, nullable: Identity of the terminology system
      - `code` string, nullable: Symbol in syntax defined by the system
      - `display` string, nullable: Representation defined by the system
      - `userSelected` boolean, nullable: If this coding was chosen directly by the user
      - `id` string, nullable: ID of the FHIR element (optional)
    - `text` string, nullable: Plain text representation of the concept
    - `id` string, nullable: ID of the FHIR element (optional)
  - `subject` FhirReference, required
    - `reference` string, required: The URL (relative or absolute) to the resource being referenced
    - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'ValueSet' | 'ValueSetConcept' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable: The type of resource being referenced
    - `id` string, nullable: ID of the FHIR element (optional)
  - `date` string, date-time, nullable: The date and time when the clinical note was created
  - `author` FhirReference[], required: The practitioner and practice location linked as the clinical note's owner
    - `reference` string, required: The URL (relative or absolute) to the resource being referenced
    - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'ValueSet' | 'ValueSetConcept' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable: The type of resource being referenced
    - `id` string, nullable: ID of the FHIR element (optional)
  - `custodian` FhirReference
    - `reference` string, required: The URL (relative or absolute) to the resource being referenced
    - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'ValueSet' | 'ValueSetConcept' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable: The type of resource being referenced
    - `id` string, nullable: ID of the FHIR element (optional)
  - `description` string, nullable, required: The title of the clinical note
  - `content` FhirDocumentReferenceContent[]: The content of the clinical note
    - `attachment` FhirAttachment
      - `data` string: The file encoded to base64 (maximum 20MB)
      - `contentType` 'application/json' | 'application/xml' | 'application/msword' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/pdf' | 'text/html' | 'text/xml' | 'text/plain' | 'image/jpeg' | 'image/png' | 'image/gif' | 'video/mp4' | 'application/zip' | 'application/fhir+json': The file format of the file attachment
      - `language` 'ar' | 'bn' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-AU' | 'es' | 'fi' | 'fr' | 'fy' | 'hi' | 'hr' | 'it' | 'ja' | 'ko' | 'nl' | 'no' | 'pa' | 'pl' | 'pt' | 'ru' | 'sr' | 'sv' | 'te' | 'zh' | 'null', nullable: Human language of the content (BCP-47)
      - `url` string, nullable: Uri where the data can be found
      - `size` integer, nullable: Number of bytes of content (if url provided)
      - `hash` string, nullable: Hash of the data (sha-1, base64ed)
      - `title` string, nullable: The file name
      - `creation` string, date-time, nullable: The date and time that the file attachment was first created
      - `id` string, nullable: ID of the FHIR element (optional)
    - `format` FhirCoding
      - `system` string, uri, nullable: Identity of the terminology system
      - `code` string, nullable: Symbol in syntax defined by the system
      - `display` string, nullable: Representation defined by the system
      - `userSelected` boolean, nullable: If this coding was chosen directly by the user
      - `id` string, nullable: ID of the FHIR element (optional)
    - `id` string, nullable: ID of the FHIR element (optional)
  - `text` FhirNarrative
    - `status` 'generated' | 'extensions' | 'additional' | 'empty': Describes how the narrative was generated
    - `div` string: Limited xhtml content
    - `id` string, nullable: ID of the FHIR element (optional)
  - `contained` FhirResourceInterface[]: Contained, inline Resources
  - `id` string, nullable: Logical id of this artifact
  - `meta` FhirResourceMeta
    - `lastUpdated` string, date-time, nullable: When the resource version last changed
    - `profile` string[]: Profiles this resource claims to conform to
  - `resourceType` string, nullable: Resource Type
  - `context` FhirDocumentReferenceContext
    - `period` FhirPeriodDateTime
      - `start` string, date-time, nullable
      - `end` string, date-time, nullable
      - `id` string, nullable: ID of the FHIR element (optional)
    - `facilityType` FhirCodeableConcept
      - `coding` FhirCoding[]: defined by a terminology system
        - `system` string, uri, nullable: Identity of the terminology system
        - `code` string, nullable: Symbol in syntax defined by the system
        - `display` string, nullable: Representation defined by the system
        - `userSelected` boolean, nullable: If this coding was chosen directly by the user
        - `id` string, nullable: ID of the FHIR element (optional)
      - `text` string, nullable: Plain text representation of the concept
      - `id` string, nullable: ID of the FHIR element (optional)
    - `id` string, nullable: ID of the FHIR element (optional)

## Response `200`

DocumentReference resource updated

- DocumentReference: Create a new Note record
  - `masterIdentifier` FhirIdentifier
    - `use` 'usual' | 'official' | 'temp' | 'secondary' | 'old' | 'null', nullable
    - `type` FhirCodeableConcept
      - `coding` FhirCoding[]: defined by a terminology system
        - `system` string, uri, nullable: Identity of the terminology system
        - `code` string, nullable: Symbol in syntax defined by the system
        - `display` string, nullable: Representation defined by the system
        - `userSelected` boolean, nullable: If this coding was chosen directly by the user
        - `id` string, nullable: ID of the FHIR element (optional)
      - `text` string, nullable: Plain text representation of the concept
      - `id` string, nullable: ID of the FHIR element (optional)
    - `system` string, nullable: The namespace for the identifier value
    - `value` string, nullable: The unique identifier
    - `period` FhirPeriodDateTime
      - `start` string, date-time, nullable
      - `end` string, date-time, nullable
      - `id` string, nullable: ID of the FHIR element (optional)
    - `assigner` FhirReference
      - `reference` string, required: The URL (relative or absolute) to the resource being referenced
      - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'ValueSet' | 'ValueSetConcept' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable: The type of resource being referenced
      - `id` string, nullable: ID of the FHIR element (optional)
    - `id` string, nullable: ID of the FHIR element (optional)
  - `status` 'current' | 'superseded': The status of the document reference
  - `docStatus` 'preliminary' | 'final', required: The status of the clinical note - preliminary for Draft, final for Published
  - `type` FhirCodeableConcept
    - `coding` FhirCoding[]: defined by a terminology system
      - `system` string, uri, nullable: Identity of the terminology system
      - `code` string, nullable: Symbol in syntax defined by the system
      - `display` string, nullable: Representation defined by the system
      - `userSelected` boolean, nullable: If this coding was chosen directly by the user
      - `id` string, nullable: ID of the FHIR element (optional)
    - `text` string, nullable: Plain text representation of the concept
    - `id` string, nullable: ID of the FHIR element (optional)
  - `category` FhirCodeableConcept[]: Categorization of the clinical note
    - `coding` FhirCoding[]: defined by a terminology system
      - `system` string, uri, nullable: Identity of the terminology system
      - `code` string, nullable: Symbol in syntax defined by the system
      - `display` string, nullable: Representation defined by the system
      - `userSelected` boolean, nullable: If this coding was chosen directly by the user
      - `id` string, nullable: ID of the FHIR element (optional)
    - `text` string, nullable: Plain text representation of the concept
    - `id` string, nullable: ID of the FHIR element (optional)
  - `subject` FhirReference, required
    - `reference` string, required: The URL (relative or absolute) to the resource being referenced
    - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'ValueSet' | 'ValueSetConcept' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable: The type of resource being referenced
    - `id` string, nullable: ID of the FHIR element (optional)
  - `date` string, date-time, nullable: The date and time when the clinical note was created
  - `author` FhirReference[], required: The practitioner and practice location linked as the clinical note's owner
    - `reference` string, required: The URL (relative or absolute) to the resource being referenced
    - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'ValueSet' | 'ValueSetConcept' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable: The type of resource being referenced
    - `id` string, nullable: ID of the FHIR element (optional)
  - `custodian` FhirReference
    - `reference` string, required: The URL (relative or absolute) to the resource being referenced
    - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'ValueSet' | 'ValueSetConcept' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable: The type of resource being referenced
    - `id` string, nullable: ID of the FHIR element (optional)
  - `description` string, nullable, required: The title of the clinical note
  - `content` FhirDocumentReferenceContent[]: The content of the clinical note
    - `attachment` FhirAttachment
      - `data` string: The file encoded to base64 (maximum 20MB)
      - `contentType` 'application/json' | 'application/xml' | 'application/msword' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/pdf' | 'text/html' | 'text/xml' | 'text/plain' | 'image/jpeg' | 'image/png' | 'image/gif' | 'video/mp4' | 'application/zip' | 'application/fhir+json': The file format of the file attachment
      - `language` 'ar' | 'bn' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-AU' | 'es' | 'fi' | 'fr' | 'fy' | 'hi' | 'hr' | 'it' | 'ja' | 'ko' | 'nl' | 'no' | 'pa' | 'pl' | 'pt' | 'ru' | 'sr' | 'sv' | 'te' | 'zh' | 'null', nullable: Human language of the content (BCP-47)
      - `url` string, nullable: Uri where the data can be found
      - `size` integer, nullable: Number of bytes of content (if url provided)
      - `hash` string, nullable: Hash of the data (sha-1, base64ed)
      - `title` string, nullable: The file name
      - `creation` string, date-time, nullable: The date and time that the file attachment was first created
      - `id` string, nullable: ID of the FHIR element (optional)
    - `format` FhirCoding
      - `system` string, uri, nullable: Identity of the terminology system
      - `code` string, nullable: Symbol in syntax defined by the system
      - `display` string, nullable: Representation defined by the system
      - `userSelected` boolean, nullable: If this coding was chosen directly by the user
      - `id` string, nullable: ID of the FHIR element (optional)
    - `id` string, nullable: ID of the FHIR element (optional)
  - `text` FhirNarrative
    - `status` 'generated' | 'extensions' | 'additional' | 'empty': Describes how the narrative was generated
    - `div` string: Limited xhtml content
    - `id` string, nullable: ID of the FHIR element (optional)
  - `contained` FhirResourceInterface[]: Contained, inline Resources
  - `id` string, nullable: Logical id of this artifact
  - `meta` FhirResourceMeta
    - `lastUpdated` string, date-time, nullable: When the resource version last changed
    - `profile` string[]: Profiles this resource claims to conform to
  - `resourceType` string, nullable: Resource Type
  - `context` FhirDocumentReferenceContext
    - `period` FhirPeriodDateTime
      - `start` string, date-time, nullable
      - `end` string, date-time, nullable
      - `id` string, nullable: ID of the FHIR element (optional)
    - `facilityType` FhirCodeableConcept
      - `coding` FhirCoding[]: defined by a terminology system
        - `system` string, uri, nullable: Identity of the terminology system
        - `code` string, nullable: Symbol in syntax defined by the system
        - `display` string, nullable: Representation defined by the system
        - `userSelected` boolean, nullable: If this coding was chosen directly by the user
        - `id` string, nullable: ID of the FHIR element (optional)
      - `text` string, nullable: Plain text representation of the concept
      - `id` string, nullable: ID of the FHIR element (optional)
    - `id` string, nullable: ID of the FHIR element (optional)

## Other responses

- `400`: Invalid input
- `403`: Forbidden
- `404`: Resource not found
- `422`: Unprocessable entity

## Changes

- **2026-11-03** `1a14a579daec`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/halaxy/apis/halaxy-api/changes/main/DocumentReference/:id/patch.md)

---

[API](https://skmtc.dev/halaxy/apis/halaxy-api.md) - [All operations](https://skmtc.dev/halaxy/apis/halaxy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/halaxy/apis/halaxy-api/revisions/1a14a579daec?raw)
