API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum


I would like to know the best practise on how to handle large data ex.

        $InvoiceHandles = $client->Debtor_GetInvoices(array('debtorHandle' => $debtorHandle))->Debtor_GetInvoicesResult->InvoiceHandle;
        $num_Invoices = count($InvoiceHandles);

        if($num_Invoices > 0)
            $Invoice .= "<h2>".$num_Invoices." faktura</h2>";
            if($num_Invoices > 1)
                $InvoiceDataObjects = $client->Invoice_GetDataArray(array('entityHandles' => $InvoiceHandles))->Invoice_GetDataArrayResult->InvoiceData;
                $InvoiceDataObjects[] = $client->Invoice_GetData(array('entityHandle' => $InvoiceHandles))->Invoice_GetDataResult;

Can i limit this om date og number of invoices?

i need invoicesfor the last 14momth

max 30 invoices
created Feb 3, 2016 by bahn
0% Accept Rate
Q 10 A 10 C 5

1 Answer


Hi Bahn

To limit the number of invoices you'd like to get you could simply look at the handles returned in the array from Debtor_GetInvoices and select the 30 highest numbers.
This is assuming that you're booking invoices sequentially though. With only the handles there's no way to limit the array by date.

If you're looking for a date interval you'd look at Invoice_FindByDateInterval, get the array and then sort from that.

answered Feb 11, 2016 by olej


Find all the documentation and resources you need to build great apps.
Go to Developer site


Get the latest news and important info from the e-conomic developer world.
Sign up now

Visma e-conomic A/S