ihoka
ihoka

Reputation: 147

Retrieving an Invoice as PDF in QuickBooks API V3

Will retrieving Invoice documents as PDFs be available in QuickBooks API V3? If so, will QuickBooks Desktop be supported as well? In V2 (Intuit Data Services), only QuickBooks Online was supported.

Upvotes: 5

Views: 1667

Answers (2)

Dharmik Dungarani
Dharmik Dungarani

Reputation: 11

    $dataService->throwExceptionOnError(true);

    $invoice = $dataService->FindById("Invoice", $invoiceId);

    $filename = "$customerEmail.pdf";

    $pdfData = $dataService->DownloadPDF($invoice, null, true);

    // Send the file to the browser.
    header('Content-Type: application/pdf');
    header('Content-Transfer-Encoding: binary');
    header('Accept-Ranges: bytes');
    header('Content-Disposition: inline; filename="' . $filename . '"');

    echo $pdfData;

Upvotes: 0

Jarred Keneally
Jarred Keneally

Reputation: 1931


It is not available in v3 yet. Currently only in v2. It will be supported eventually but not in the next 6 months. You can of course use v3 and v2 only to save an invoice as pdf if necessary.

thanks
Jarred

Upvotes: 3

Related Questions