| Name | Type | Required | Data |
|---|---|---|---|
| username | Text varchar(50) | YES | Username |
| password | Text varchar(100) | YES | Password |
| user_token | Text | YES | Token provided |
| Name | Type | Required | Data |
|---|---|---|---|
| date_from | date (Y-m-d) | NO | Date from invoice created (exp. 2022-07-10) |
| date_to | date (Y-m-d) | NO | Date to invoice created (exp. 2023-07-25) |
$post = [
'username' => '',
'password' => '',
'user_token' => '',
];
$ch = curl_init('https://api.rrr.lt/v2/get/invoice_list/2025-01-01/2025-10-10');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = json_decode(curl_exec($ch));
curl_close($ch);
The download_url field in the response points to the API endpoint that serves the invoice PDF file.
To download the file, make a POST request to the URL with the same authentication parameters (username, password, user_token or JWT Bearer token).
Endpoint: https://api.rrr.lt/v2/get/invoice-download/{path}
Response: PDF file (Content-Type: application/pdf)
$post = [
'username' => '',
'password' => '',
'user_token' => '',
];
$downloadUrl = $invoice['download_url']; // URL from invoice_list response
$ch = curl_init($downloadUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$pdfContent = curl_exec($ch);
curl_close($ch);
file_put_contents('invoice.pdf', $pdfContent);
{
"list": [
{
"buyer_name": "Vardenis Pavardenis",
"country_code": "LT",
"invoice_full_number": "INV21",
"invoice_date": "2025-02-28",
"type": "DEBIT",
"invoice_created_at": "2025-02-28",
"download_url": "https://api.rrr.lt/v2/get/invoice-download/abc/2025/02/28/1234567-order-invoice-743feadeeb560dd5a2cd143c170d8970.pdf",
"total_amount": "125.25",
"seller_currency": "EUR"
},
{
"buyer_name": "John Foo",
"country_code": "LT",
"invoice_full_number": "INV22",
"invoice_date": "2025-02-28",
"type": "DEBIT",
"invoice_created_at": "025-02-28",
"download_url": "https://api.rrr.lt/v2/get/invoice-download/abc/2025/02/28/1234568-order-invoice-853feadeeb560dd5a2cd143c170d8971.pdf",
"total_amount": "425.00",
"seller_currency": "EUR"
},
{
"buyer_name": "Foo Man",
"country_code": "PL",
"invoice_full_number": "KINV3",
"invoice_date": "2025-03-13",
"type": "CREDIT",
"invoice_created_at": "2025-03-13",
"download_url": "https://api.rrr.lt/v2/get/invoice-download/abc/2025/03/13/1234569-order-invoice-963feadeeb560dd5a2cd143c170d8972.pdf",
"total_amount": "100.00",
"seller_currency": "EUR"
},
],
"msg": "OK",
"status_code": "R200"
}