Skip to main content
GET
Get invoice data

Missing and deleted invoices

Retrieve a saved invoice with ref={invoiceId}. Unknown, permanently deleted and other-company invoices return HTTP 404 with errorCode: "NOT_FOUND" and the same generic message. This does not disclose whether another company has the document. A soft-deleted invoice owned by the API key’s company also returns HTTP 404, with errorMessage: "Invoice has been deleted". Its data is not returned. This message can distinguish your company’s soft-deleted document from an unknown identifier. A permanently deleted draft no longer has a record, so its response remains generic. These checks also apply to documents referenced through related when preparing another invoice.

Correction prefill

related={originalId}&invoiceType=CORRECTION prepares a correction from the referenced invoice. The returned rows are copied from that invoice, without applying earlier corrections to calculate an effective balance. To correct a previous correction, reference that correction: its stored rows represent its after-correction state, while its totals represent the financial difference. See correction input and full returns.

Authorizations

Authorization
string
header
required

OpenApi Key created within Altera.app for a certain company

Query Parameters

ref
integer

InvoiceId identificator of the exact invoice we wish to retrieve

Example:

36891

Comma delimited list of related invoices we wish to create a reference from. For CORRECTION this copies the referenced invoice, not the cumulative state after previous corrections. For a correction of a correction, pass the previous correction identifier.

Example:

"124,551"

invoiceType
enum<string>

Invoice type for the new invoice we wish to create based on related invoices

Available options:
SALES,
CORRECTION,
INTERIM_FINAL
Example:

"CORRECTION"

Response

OK

result
string
default:OK
data
object