Skip to main content
GET
/
expenses
/
{id}
/
efactura-pdf
curl -X GET "https://api.contazen.ro/v1/expenses/exp_abc123/efactura-pdf" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o efactura.pdf
"<string>"

Overview

Returns the e-Factura PDF for an expense that was imported from the ANAF e-Factura SPV inbox. The PDF is rendered on demand via the ANAF public validator the first time it is requested and cached on disk for subsequent calls. This endpoint requires the same Bearer authentication as the rest of the API. Use the efactura.pdf_url field from Retrieve Expense to discover the URL — it is only present when efactura.xml_available is true.

Path Parameters

id
string
required
The CzUid of the expense

Response

Returns application/pdf binary content with Content-Disposition: inline.

Error Responses

404 Not Found
Returned when the expense was not imported from SPV (efactura_not_available) or its XML file is missing on disk (efactura_xml_missing).
502 Bad Gateway
The ANAF validator failed to convert the XML to PDF (efactura_pdf_generation_failed).
curl -X GET "https://api.contazen.ro/v1/expenses/exp_abc123/efactura-pdf" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o efactura.pdf

Authorizations

Authorization
string
header
required

Use your API key (sk_live_xxx or sk_test_xxx)

Path Parameters

id
string
required

Expense CzUid

Response

PDF stream

The response is of type file.