---
title: "Read Invoice Xml"
method: GET
path: "/api/autopilot/invoices/{invoice_id}/xml"
tags: ["autopilot"]
---

# Read Invoice Xml

`GET /api/autopilot/invoices/{invoice_id}/xml`

## Request

- Base URL: `https://api.taxcompass.it` (the document declares no server; this is the origin it was published from)
- URL: `https://api.taxcompass.it/api/autopilot/invoices/{invoice_id}/xml`
- Auth: HTTP bearer

The FatturaPA document exactly as it went to SdI (AP-033).

The counterpart of ``/pdf``, and the more load-bearing of the two: the PDF
restates the invoice for a human, this *is* the invoice. The bytes come back
unchanged and under the transmission filename SdI knows them by, both read
out of the stored document rather than recomputed from a profile the user
can still edit.

Served for every status that has a document, ``rejected`` included — the
exact bytes SdI refused are what a scarto is diagnosed from. A **draft** is a
409 for the same reason it is on ``/pdf``: the caller can read that row, so
the reason is not a secret, and issuing is the missing step.

A numbered row whose document cannot be read back is a 500 rather than a
404 or an improvised file. It means this deployment lost (or never had) the
key its own rows were written with, which is a server fault and needs to look
like one.

No route-level rate limit: a read, like the other reads here.

## Path parameters

- `invoice_id` string, uuid, required

## Response `200`

The transmitted FatturaPA document

## Other responses

- `409`: The invoice has not been issued yet
- `422`: Validation Error
- `500`: The stored document could not be read back

---

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