> For the complete documentation index, see [llms.txt](https://docs.journl.dk/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.journl.dk/v1/api/fhir-api/crud/delete.md).

# Delete

Description of how to delete a resource using our FHIR API.

<mark style="color:green;">`DELETE`</mark> `{base}/fhir/{type}`

Below is an example of how to use a <mark style="color:green;">`DELETE`</mark> request to remove a resource. A complete list of resources can be found by visiting the resource specifications [here](https://www.hl7.org/fhir/resourcelist.html).&#x20;

Upon successful deletion of a resource, the server responds with a 200 OK status. If you attempt to delete a resource that has already been deleted, the server will respond with a 204 No Content status, in accordance with the FHIR specification.

**Request**\ <mark style="color:green;">`DELETE`</mark> `{base}/fhir/Patient/{id}`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "name": [
    {
      "given": ["Bernard"]
    }
  ],
  "id": "20304050",
  "resourceType": "Patient",
  "meta": {
    "lastUpdated": "2024-07-16T12:10:47.885463Z",
    "versionId": "540524",
    "extension": [
      {
        "url": "ex:createdAt",
        "valueInstant": "2024-07-16T10:08:33.753699Z"
      }
    ]
    "tag": [
      {
        "system": "https://journl.dk",
        "code": "deleted"
      }
    ]
  }
}
```

{% endtab %}

{% tab title="204" %}

```json
{
  "success": "No Content"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "error": "Unauthorized"
}
```

{% endtab %}
{% endtabs %}
