---
title: "Get CONTRIBUTION by id"
method: GET
path: "/ehr/{ehr_id}/contribution/{contribution_uid}"
tags: ["CONTRIBUTION"]
---

# Get CONTRIBUTION by id

`GET /ehr/{ehr_id}/contribution/{contribution_uid}`

Retrieves a CONTRIBUTION identified by `contribution_uid` and associated with the EHR identified by `ehr_id`.

### Simplified Formats (FLAT / STRUCTURED)

The `Accept` header MAY be set to one of the Simplified Formats MIME types - `application/openehr.wt.flat+json` or `application/openehr.wt.structured+json` - in addition to the canonical `application/json` / `application/xml`.

When a Simplified Formats MIME type is requested, the **CONTRIBUTION envelope itself is still returned as canonical JSON** (`uid`, `versions[]` metadata, `audit`). Only the inner `versions[i].data` payload (`COMPOSITION`, `EHR_STATUS`, or `FOLDER`) is serialized in the chosen FLAT or STRUCTURED form. See [Simplified Formats](../simplified_formats.html) for the rules that apply to that inner payload.

## Path parameters

- `ehr_id` string, uuid, required
- `contribution_uid` string, uuid, required

## Headers

- `Accept` 'application/json' | 'application/xml' | 'application/openehr.wt.flat+json' | 'application/openehr.wt.structured+json'

## Response `200`

`200 OK` is returned when the CONTRIBUTION is successfully retrieved.

When the request `Accept` header selects a Simplified Formats MIME type (`application/openehr.wt.flat+json` or `application/openehr.wt.structured+json`), the response body is still a canonical CONTRIBUTION envelope; only each `versions[i].data` payload is serialized in the requested FLAT or STRUCTURED form.

- Contribution — A CONTRIBUTION resource
  - `uid` HierObjectId, required
    - `_type` string
    - `value` string, required
  - `versions` ObjectRefOfObjectVersionId[], required
    - `namespace` string, required
    - `type` string, required
    - `id` ObjectId, required
      - `_type` string
      - `value` string, required
  - `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

## Other responses

- `404` — `404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when a CONTRIBUTION with `contribution_uid` does not exist.

---

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