---
title: "Get bill attachment content · Bills · COUNT Partner API"
description: "Returns one bill attachment's file, base64-encoded. GET /partners/bills/{uuid}/attachments/{attachmentUuid}/content"
canonical: "https://developers.getcount.com/reference/bills/get-bill-attachment-content"
source: "https://developers.getcount.com/reference/bills/get-bill-attachment-content"
---
[Bills](https://developers.getcount.com/reference/bills) / Get bill attachment content

# Get bill attachment content

GET `/partners/bills/{uuid}/attachments/{attachmentUuid}/content`

Returns one bill attachment's file, base64-encoded.

For callers that cannot follow a link, such as an MCP client. Files over 10 MB return 413; download those from the `documentUrl` the list returns.

HMAC signature + Bearer access token

[Try this request](https://developers.getcount.com/tools/try-it?method=GET&path=%2Fpartners%2Fbills%2F%7Buuid%7D%2Fattachments%2F%7BattachmentUuid%7D%2Fcontent)

[Transactions API](https://developers.getcount.com/reference/transactions) [Vendors API](https://developers.getcount.com/reference/vendors) [Chart of Accounts API](https://developers.getcount.com/reference/chart-of-accounts)

#### Path parameters

`uuid` uuid required

The bill or vendor memo UUID.

`attachmentUuid` uuid required

The attachment UUID from List bill attachments.

#### Responses

`200` The file, base64-encoded. MCP tools deliver the same file as an embedded resource instead of text.

`400` The attachment is only a link to a file outside COUNT, so COUNT cannot read it. Open the link instead.

`403` The file is in COUNT but cannot be read through the API: it is private to the firm, password-protected, or not one of this workspace's own files. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-403)

`404` The record or attachment was not found in this workspace.

`413` The file is larger than 10 MB. Download it from the signed link the attachment list returns.

`429` More than 40 content reads a minute for this client and workspace. Retry after the Retry-After header. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-429)

`401` Missing or invalid HMAC signature, expired timestamp, or invalid Bearer token. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-401)

`403` The credential does not have access to this workspace or resource. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-403)

`429` Rate limit exceeded (100 requests per minute per user of each app, or 10,000 per minute per app). Retry after the Retry-After header. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-429)

[Previous DELETE Delete bill attachment](https://developers.getcount.com/reference/bills/delete-bill-attachment)

GET `https://api.getcount.com/partners/bills/{uuid}/attachments/{attachmentUuid}/content`

Request

```javascript
import crypto from 'node:crypto';

const BASE_URL = 'https://api.getcount.com';
const CLIENT_ID = process.env.COUNT_CLIENT_ID;
const CLIENT_SECRET = process.env.COUNT_CLIENT_SECRET;
const ACCESS_TOKEN = process.env.COUNT_ACCESS_TOKEN;

const method = 'GET';
const signingPath = '/bills/3fa85f64-5717-4562-b3fc-2c963f66afa6/attachments/3fa85f64-5717-4562-b3fc-2c963f66afa6/content';
const timestamp = Math.floor(Date.now() / 1000).toString();
const bodyString = '';

const bodyHash = '';
const baseString = `${method}:${signingPath}:${timestamp}:${bodyHash}`;
const signature = crypto.createHmac('sha256', CLIENT_SECRET).update(baseString).digest('hex');

const response = await fetch(`${BASE_URL}/partners/bills/3fa85f64-5717-4562-b3fc-2c963f66afa6/attachments/3fa85f64-5717-4562-b3fc-2c963f66afa6/content`, {
  method,
  headers: {
    'x-client-id': CLIENT_ID,
    'x-timestamp': timestamp,
    'x-signature': signature,
    Authorization: `Bearer ${ACCESS_TOKEN}`,
  },
});

console.log(await response.json());
```

Response · 200

```json
{
  "status": "success",
  "message": "Attachment content retrieved successfully",
  "data": {
    "attachment": {
      "id": "a9b8c7d6-e5f4-4a3b-9c2d-1e0f9a8b7c6d",
      "title": "Supplier invoice",
      "fileName": "INV-20481.pdf",
      "contentType": "application/pdf",
      "sizeInBytes": 70,
      "contentBase64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
    }
  }
}
```
