---
title: "Get attached file from an invoice"
method: GET
path: "/Invoice/attachedFileFromInvoice/{idInvoice}/{filename}"
tags: ["Invoice"]
---

# Get attached file from an invoice

`GET /Invoice/attachedFileFromInvoice/{idInvoice}/{filename}`

## Request

- Base URL: `https://api-sandbox.payabli.com/api`
- URL: `https://api-sandbox.payabli.com/api/Invoice/attachedFileFromInvoice/{idInvoice}/{filename}`
- Auth: HTTP bearer

Retrieves a file attached to an invoice.

## Path parameters

- `filename` string, required
- `idInvoice` integer, required

## Query parameters

- `returnObject` boolean

## Response `200`

A successful response returns a binary file when `returnObject` is `false`. When `returnObject` is `true`, the response contains the file content as a Base64-encoded string in an object. Due to technical limitations, only the object response is documented here.

- FileContent: Contains details about a file. Max upload size is 30 MB.
  - `fContent` string: Content of file, Base64-encoded. Ignored if `furl` is specified. Max upload size is 30 MB.
  - `filename` string: The name of the attached file.
  - `ftype` 'pdf' | 'doc' | 'docx' | 'jpg' | 'jpeg' | 'png' | 'gif' | 'txt': The MIME type of the file (if content is provided).
  - `furl` string: Optional URL provided to show or download the file remotely.

## Other responses

- `400`: Bad request / invalid data.
- `401`: Unauthorized request.
- `500`: Internal server error.
- `503`: Database connection error.

---

[API](https://skmtc.dev/payabli/apis/payabli.md) - [All operations](https://skmtc.dev/payabli/apis/payabli/llms.txt) - [OpenAPI document](https://skmtc.dev/payabli/apis/payabli/revisions/67edff30d4b4?raw)
