---
title: "Get versioned COMPOSITION version at time"
method: GET
path: "/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version"
tags: ["COMPOSITION"]
---

# Get versioned COMPOSITION version at time

`GET /ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version`

Retrieves a VERSION from the VERSIONED_COMPOSITION identified by `versioned_object_uid` and associated with the EHR identified by `ehr_id`.

If `version_at_time` is supplied, retrieves the VERSION extant _at specified time_, otherwise retrieves the _latest_ VERSION.

## Path parameters

- `ehr_id` string, uuid, required
- `versioned_object_uid` string, uuid, required

## Query parameters

- `version_at_time` string, datetime

## Headers

- `Accept` 'application/json' | 'application/xml'
- `Content-Type` 'application/json' | 'application/xml'

## Response `200`

`200 OK` is returned when the requested VERSION is successfully retrieved.

- VersionOfComposition — A VERSION resource
  - `_type` string
  - `contribution` ObjectRefOfHierObjectId, required
    - `namespace` string, required
    - `type` string, required
    - `id` ObjectId, required
      - `_type` string
      - `value` string, required
  - `signature` string
  - `commit_audit` AuditDetails, required — The set of attributes required to document the committal of an information item to a repository.
    - `_type` string
    - `system_id` string, required
    - `time_committed` DvDateTime, required
      - `_type` string
    - `change_type` DvCodedText, required
      - `_type` string
    - `description` DvText
      - `_type` string
    - `committer` PartyProxy, required
      - `_type` string, required
      - `external_ref` PartyRef
        - `namespace` string, required
        - `type` string, required
        - `id` ObjectId, required
          - `_type` string
          - `value` string, required
  - `data` Composition, required
    - `_type` string

## Other responses

- `404` — `404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when `versioned_object_uid` does not exist, or when a version of the resource does not exist at the specified `version_at_time`.

## Changes

- **2026-04-27** `a81c0c47d29d` — 2 breaking, 41 info
  - the response property `data/content` became optional for the status `200`
  - the response property `data/context` became optional for the status `200`
  - added `SECTION` discriminator mapping keys to the `data/allOf[subschema #1: Versionable]/allOf[subschema #1: LOCATABLE]/` response property for the response status `200`
  - added `SECTION` discriminator mapping keys to the `data/allOf[subschema #1: Versionable]/allOf[subschema #1: LOCATABLE]/allOf[subschema #1: PATHABLE]/` response property for the response status `200`
  - …39 more
- **2025-11-05** `660ec5865c0d` — 2 info
  - added the new optional `header` request parameter `Accept`
  - added the new optional `header` request parameter `Content-Type`
- **2025-03-13** `5e14066ac8dd` — 3 breaking
  - for the `path` request parameter `ehr_id`, the type/format was changed from `string`/`` to `string`/`uuid`
  - for the `path` request parameter `versioned_object_uid`, the type/format was changed from `string`/`` to `string`/`uuid`
  - for the `query` request parameter `version_at_time`, the type/format was changed from `string`/`` to `string`/`datetime`
- …earlier changes not shown

[Full history](https://skmtc.dev/openehr/apis/ehr-api/changes/ehr/:ehr_id/versioned_composition/:versioned_object_uid/version/get.md)

---

[API](https://skmtc.dev/openehr/apis/ehr-api.md) · [All operations](https://skmtc.dev/openehr/apis/ehr-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openehr/ehr-api/revisions/a0e37a217524/schema)
