---
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, uuid, required
- `uid_based_id` string, required

## Response `204`

`204 No Content` is returned for a successful delete operation.

## Other responses

- `400` — `400 Bad Request` is returned when the request could not be parsed or is invalid (e.g. malformed request URL syntax, missing required header or parameter, or syntactically invalid header, parameter or content) 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_uid` in the `ETag` header.

---

[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)
