-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
Missing options (optional):
- voucherDateFrom
- voucherDateTo
- createdDateFrom
- createdDateTo
- updatedDateFrom
- updatedDateTo
in
Documentation: https://developers.lexoffice.io/docs/#voucherlist-endpoint-retrieve-and-filter-voucherlist
The reason for this issue is, that I have more than 10000 vouchers in my lexoffice account. When requesting all of them, I get
Fatal error: Uncaught GuzzleHttp\Exception\ServerException: Server error: `GET https://api.lexoffice.io/v1/voucherlist?page=100&size=100&sort=voucherNumber,DESC&voucherType=salesinvoice&voucherStatus=draft,open,paid,paidoff,voided,accepted,rejected` resulted in a `500 Internal Server Error` response:
{ "timestamp" : "2022-07-01T09:50:53.481+02:00", "status" : 500, "error" : "Internal Server Error", "path": "/v1/vouche (truncated...)
in /lexoffice-scanner/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
I think this could be solved by reducing the result (I just need the last month).
Code:
$client = $api->voucherlist();
$client->sortDirection = 'DESC';
$client->sortColumn = 'voucherNumber';
$client->types = [
'salesinvoice'
];
$client->statuses = [
'draft',
'open',
'paid',
'paidoff',
'voided',
'accepted',
'rejected'
];
$response = $client->getAll();Metadata
Metadata
Assignees
Labels
No labels