api.routes.invoice.get¶
Attributes¶
Functions¶
|
Retrieve a PDF invoice file by its hash. |
Module Contents¶
- api.routes.invoice.get.logger¶
- api.routes.invoice.get.router¶
- async api.routes.invoice.get.get_invoice_pdf(hash: str)¶
Retrieve a PDF invoice file by its hash.
- Parameters:
hash – The hash of the invoice file to retrieve (directory name in invoices_backup)
- Returns:
The PDF file as a downloadable response
- Return type:
FileResponse
- Raises:
HTTPException –
422 if no backup directory found with the given hash
422 if no PDF file found in the directory for the given hash