<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKCDADocumentSample/document",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKCDADocumentSample(py)document"
  },
  "title" : "document"
}
-->

# document

The CDA document.

```
var document: HKCDADocument? { get }
```

## Discussion

If the user is authorized to access the document’s data, this property contains an [`HKCDADocument`](/documentation/HealthKit/HKCDADocument) object representing that data. Otherwise, it is set to `nil`.

The user is asked to authorize each CDA document the first time that document is returned by an [`HKDocumentQuery`](/documentation/HealthKit/HKDocumentQuery) query. The user can change the access permissions in the Health app.

For samples returned by an [`HKSampleQuery`](/documentation/HealthKit/HKSampleQuery) or an [`HKAnchoredObjectQuery`](/documentation/HealthKit/HKAnchoredObjectQuery), this property is always set to `nil`. To access the document’s data from these samples, create a [`HKDocumentQuery`](/documentation/HealthKit/HKDocumentQuery) query for the sample’s UUID.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)