Skip to main content

Querying Invoice Data


The data of an existing invoice can be queried. This is demonstrated in the following example file: ./examples/document/invoice/get_invoice_data.php


Invoice data can be queried based on the invoice number or order number. When querying based on the order number, the last document with this order number is returned. If desired, the invoice PDF can be downloaded as well by specifying an additional parameter.

// Download based on invoice number:

// Download based on order number (including invoice PDF):
$agent->getInvoiceData('TESZT-001', Invoice::FROM_ORDER_NUMBER, true);

// Retrieve all invoice data as follows:

Expected and Optional Inputs

Invoice Data

Invoice numberinvoiceNumberstringyes
Order numberorderNumberstring
PDF downloaddownloadPdfbooleanfalse