---
title: "Download a legal file of a credit note filing"
method: GET
path: "/public/v2/e-invoicing/customer-credits/{number}/files/{attachment_id}/"
tags: ["E-invoicing"]
---

# Download a legal file of a credit note filing

`GET /public/v2/e-invoicing/customer-credits/{number}/files/{attachment_id}/`

## Request

- Base URL: `https://api.dualentry.com`
- URL: `https://api.dualentry.com/public/v2/e-invoicing/customer-credits/{number}/files/{attachment_id}/`
- Auth: none declared

Return a short-lived URL that downloads one legal file of the e-invoice filing of the customer credit, such as the authority PDF or XML. Read the `attachment_id` from `files` on the filing. You need the customer credit view permission.

The request fails in these cases:

- The request fails with `404` when the customer credit has no filing, or when the filing does not hold that file.
- The request fails with `402` before it checks the permission, when the organization has no e-invoicing subscription and DualEntry did not file the customer credit.

## Path parameters

- `number` integer, required
- `attachment_id` integer, required

## Response `200`

OK

- PublicEInvoicingFileUrlSchemaOut
  - `url` string, required: A short-lived URL that downloads the file.

## Other responses

- `402`: Payment Required
- `403`: Forbidden
- `404`: Not Found

## Changes

- **2026-10-14** `3d645439b1e4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/dualentry/apis/dualentry-public-api/changes/public/v2/e-invoicing/customer-credits/:number/files/:attachment_id/get.md)

---

[API](https://skmtc.dev/dualentry/apis/dualentry-public-api.md) · [All operations](https://skmtc.dev/dualentry/apis/dualentry-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dualentry/apis/dualentry-public-api/revisions/7588ae19aaff?raw)
