Pagination
Lists come in pages. Follow the cursor until it is empty.
Every list takes limit and cursor and answers {items, nextCursor}.
| Name | Meaning |
|---|---|
limit | Records per page, from 1 to 500. The default is 100. |
cursor | Opaque text from nextCursor of the previous page. Leave it out for the first page. |
nextCursor | The cursor of the next page, or null after the last page. |
curl
curl "$RDC_BASE_URL/efactura/v1/invoices?companyId=c6a26b8c-3323-4e7a-8611-f5a92f5e1a42&limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/invoices?companyId=c6a26b8c-3323-4e7a-8611-f5a92f5e1a42&limit=20`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/efactura/v1/invoices?companyId=c6a26b8c-3323-4e7a-8611-f5a92f5e1a42&limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/invoices?companyId=c6a26b8c-3323-4e7a-8611-f5a92f5e1a42&limit=20');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/efactura/v1/invoices?companyId=c6a26b8c-3323-4e7a-8611-f5a92f5e1a42&limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"id": "5081abd5-935d-4688-b961-0715c149fbd1",
"companyId": "c6a26b8c-3323-4e7a-8611-f5a92f5e1a42",
"number": "FCT-2026-00425",
"type": "invoice",
"direction": "sent",
"partner": "Cofetăria Vălul Alb SRL",
"partnerCif": "RO39172614",
"issueDate": "2026-11-23",
"dueDate": "2026-12-23",
"reference": "CV-1048",
"correctionOf": null,
"creditOf": null,
"lines": [
{
"code": "FA-0010",
"name": "White flour, 10 kg bag",
"quantity": "12",
"unitPrice": "38.90",
"vatRate": "11",
"net": "466.80"
},
{
"code": "ZA-0201",
"name": "Sugar, 1 kg",
"quantity": "30",
"unitPrice": "4.29",
"vatRate": "11",
"net": "128.70"
}
],
"net": "595.50",
"vatBreakdown": [
{
"rate": "11",
"base": "595.50",
"vat": "65.51"
}
],
"vat": "65.51",
"total": "661.01",
"currency": "RON",
"status": "draft",
"uploadIndex": null,
"revision": 1
},
{
"id": "ab7f7203-2bf2-4131-8b1b-34041c1afe3d",
"companyId": "c6a26b8c-3323-4e7a-8611-f5a92f5e1a42",
"number": "FCT-2026-00424",
"type": "invoice",
"direction": "sent",
"partner": "Market Trei Brazi SRL",
"partnerCif": "39172851",
"issueDate": "2026-11-23",
"dueDate": "2026-12-23",
"reference": "",
"correctionOf": null,
"creditOf": null,
"lines": [
{
"code": "FA-0010",
"name": "White flour, 10 kg bag",
"quantity": "30",
"unitPrice": "38.90",
"vatRate": "11",
"net": "1167.00"
},
{
"code": "DT-0412",
"name": "Dishwashing liquid, 5 l",
"quantity": "8",
"unitPrice": "23.47",
"vatRate": "19",
"net": "187.76"
}
],
"net": "1354.76",
"vatBreakdown": [
{
"rate": "19",
"base": "187.76",
"vat": "35.67"
},
{
"rate": "11",
"base": "1167.00",
"vat": "128.37"
}
],
"vat": "164.04",
"total": "1518.80",
"currency": "RON",
"status": "draft",
"uploadIndex": null,
"revision": 1
}
],
"nextCursor": null
} Read every page
let cursor = null;
do {
const query = new URLSearchParams({limit: '100'});
if (cursor) query.set('cursor', cursor);
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/invoices?${query}`, {
headers: {Authorization: `Bearer ${process.env.RDC_TOKEN}`},
});
const page = await response.json();
for (const item of page.items) console.log(item);
cursor = page.nextCursor;
} while (cursor); The full rule: Developer guide