Saltar al contenido principal
GET
/
v1
/
invoices
/
{id}
/
download
Download an invoice PDF
curl --request GET \
  --url https://api.finseed.es/v1/invoices/{id}/download \
  --header 'Authorization: Bearer <token>'
{
  "download_url": "https://api.finseed.es/v1/invoices/inv_clx123abc456/file?token=…",
  "filename": "2026-000123.pdf",
  "expires_at": "2026-06-02T08:35:00Z"
}
Every invoice has a PDF. This endpoint returns a signed download_url to it. The link stays valid for 24 hours, shown in expires_at — long enough to embed in a page your own client opens later. Request a fresh one once it expires rather than storing it indefinitely. There are two common ways to use it:
  • Download invoices to your own systems. Page through the list of invoices, then call this endpoint for each one and save the PDF on your side. This runs server to server, behind your API key.
  • Let your users download an invoice. When a user clicks “download” in your app, call this endpoint from your backend and redirect the browser to download_url. Your API key stays on your server, and the browser only ever sees the short-lived link.
This endpoint authenticates your integration, not your end users: your API key can reach every invoice in its environment. Before you return an invoice to a signed-in user, check in your own application that the invoice belongs to them.

Autorizaciones

Authorization
string
header
requerido

API key sent as a bearer token in the Authorization header.

Parámetros de ruta

id
string
requerido

Opaque invoice identifier — the id from a list row.

Respuesta

A signed link to download the invoice PDF.

A signed link to download an invoice as a PDF.

download_url
string
requerido

Signed URL on the API host that returns the invoice PDF. Hand it straight to a browser to download the file. It stays valid for 24 hours, so you can embed it in a page; request a fresh one once it expires.

Ejemplo:

"https://api.finseed.es/v1/invoices/inv_clx123abc456/file?token=…"

filename
string
requerido

Suggested file name for the downloaded PDF.

Ejemplo:

"2026-000123.pdf"

expires_at
string
requerido

When download_url stops working, RFC 3339 in UTC. Request a fresh link after this.

Ejemplo:

"2026-06-02T08:35:00Z"