---
title: "Delete COMPOSITION"
method: DELETE
path: "/ehr/{ehr_id}/composition/{uid_based_id}"
tags: ["COMPOSITION"]
---

# Delete COMPOSITION

`DELETE /ehr/{ehr_id}/composition/{uid_based_id}`

Deletes the COMPOSITION identified by `uid_based_id` and associated with the EHR identified by `ehr_id`.

The `uid_based_id` MUST be in a form of an OBJECT_VERSION_ID identifier taken from the last (most recent) VERSION.uid.value, representing the `preceding_version_uid` to be deleted.

## Path parameters

- `ehr_id` string, required
- `uid_based_id` string, required

## Response `204`

`204 No Content` is returned when COMPOSITION was deleted.

## Other responses

- `400` — `400 Bad Request` is returned when the request URL could not be parsed (i.e. invalid format of request parameters) or when the resource identified by the request parameters is already deleted.
- `404` — `404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when the `uid_based_id` does not exist.
- `409` — `409 Conflict` is returned when supplied `uid_based_id` doesn't match the latest version. Returns also latest version in the `Location` and `ETag` headers.

---

[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/ff910ba47bcc/schema)
