# Shared download APIs

Some v1 attachment download endpoints are shared across services. Use them when you already have attachment IDs and need to retrieve the corresponding files directly.

For service-specific downloads, see the relevant service API reference, such as [EviNotice API](/products/namirialnotify/apis/evinotice-api).

## Download attachments by ID


```
POST /AttachmentDownload
GET /AttachmentDownload
```

Receives a list of attachment identifiers and returns attachment metadata and base64-encoded content.

Request body:

| Field | Description |
|  --- | --- |
| `UniqueIds` | List of attachment UUIDs to download. |


Response fields (v1 responses are camelCase):

| Field | Description |
|  --- | --- |
| `results` | Collection of matching attachments (see fields below). |
| `totalMatches` | Number of matching attachments found. |
| `responseStatus` | Error details when automatic exception handling returns one. |


Each attachment in `results` contains:

| Field | Type | Description |
|  --- | --- | --- |
| `uniqueId` | UUID | Unique identifier of the attachment. |
| `creationDate` | date-time | When the attachment was created. |
| `evidenceUniqueId` | UUID | Identifier of the evidence it belongs to. |
| `partyId` | UUID | Identifier of the related party, when applicable. |
| `contentId` | string | Content identifier. |
| `displayName` | string | Display name. |
| `filename` | string | File name. |
| `mimeType` | string | MIME type of the content. |
| `contentDescription` | string | Content description. |
| `contentDisposition` | string | Content disposition. |
| `contentLocation` | string | Content location. |
| `contentEncoding` | string | Content encoding. |
| `contentLength` | integer | Content length in bytes. |
| `hash` | string | Hash of the content (algorithm and value). |
| `data` | string | Attachment content, Base64-encoded. |
| `attributes` | array | Optional key-value attributes; omitted when empty. |


Example response:


```json
{
  "results": [
    {
      "uniqueId": "000c1f70-42ac-a3ea-149f-943879726a87",
      "creationDate": "2020-11-20T17:28:57.1880970+01:00",
      "evidenceUniqueId": "000d1f70-42ac-a3ea-189f-943879726a87",
      "contentId": "ee302292-8f64-479b-b5dd-ac79010f8895",
      "displayName": "Attachment.pdf",
      "filename": "Attachment.pdf",
      "mimeType": "application/pdf",
      "contentDisposition": "attachment; filename=\"Attachment.pdf\"",
      "contentEncoding": "utf-8",
      "contentLength": 2960790,
      "hash": "{algorithm:SHA256,value:3/V5lRHf87BNUmWsFSOeeny0OUEUH8c8h2RgU0FjZp0=}",
      "data": "<base64-encoded file content>"
    }
  ],
  "totalMatches": 1
}
```

## OpenAPI specification

Use the [shared download OpenAPI specification](/products/namirialnotify/apis/oas/downloads-api) for a machine-readable definition of these attachment endpoints.

## Related

- [API reference overview](/products/namirialnotify/apis/overview)
- [EviNotice API](/products/namirialnotify/apis/evinotice-api)
- [Evidence and affidavits](/products/namirialnotify/user-guides/evidences-affidavits)