> ## Documentation Index
> Fetch the complete documentation index at: https://help.elationhealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview - Attachments

## Overview

> \[!NOTE]
> This Endpoint is in preview and is not yet available to all users

Attachments are binary documents attached to DocumentReference entities in FHIR.

## Attachment by DocumentReference ID and Attachment ID

Requests the Attachment data for a specific attachment from a specific DocumentReference.

**METHOD** *GET*

```
[base url]/attachment/report/`{document_reference_id}`/`{attachment_id}`
```

**PARAMS**\
\[base url] - [FHIR base url](/articles/fhir/service-base-urls)\
\[document\_reference\_id] - The ID of the DocumentReference entity
\[attachment\_id] - The ID of the specific attachment to download

**HEADERS**

The Authorization token SHALL be obtained during the Authentication and Authorization process. Go to [Authentication and Authorization](/articles/fhir/authentication-authorization) for further details.

| Header        | Type       | Required/Optional | Value            |
| ------------- | ---------- | ----------------- | ---------------- |
| Authorization | **string** | required          | `Bearer <token>` |

## **RESPONSES**

| Code | Description                        | Comment                                                                                                                                         |
| ---- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | OK                                 | The request was processed successfully                                                                                                          |
| 400  | Bad request                        | Invalid request parameters or FHIR operation outcome resource returned                                                                          |
| 401  | Unauthorized                       | This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource |
| 404  | No route matched with those values | The request was able to communicate with a given server, but the server could not find what was requested                                       |
| 500  | Internal Server Error              | The server has encountered a situation it doesn't know how to handle                                                                            |

***

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/attachment/report/123/456' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'
```
