List endpoints support limit/offset pagination to efficiently handle large datasets.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 100 | Maximum number of records to return per page |
offset | integer | 0 | Number of records to skip before starting to return results |
- Page 1:
offset=0, limit=100→ Returns records 1-100 - Page 2:
offset=100, limit=100→ Returns records 101-200 - Page 3:
offset=200, limit=100→ Returns records 201-300
# First page (default)
curl "https://api.dualentry.com/v1/invoices" \
-H "X-API-KEY: your_api_key_here"
# Custom page size
curl "https://api.dualentry.com/v1/invoices?limit=50&offset=100" \
-H "X-API-KEY: your_api_key_here"List endpoints return an array of resources:
[
{
"id": "inv_001",
"customer": "Customer A",
"total": 1500.00
},
{
"id": "inv_002",
"customer": "Customer B",
"total": 2300.00
}
]Continue fetching pages until you receive an empty array or fewer records than requested:
all_records = []
offset = 0
limit = 100
while True:
response = requests.get(
"https://api.dualentry.com/v1/invoices",
headers=headers,
params={"limit": limit, "offset": offset}
)
records = response.json()
if not records:
break
all_records.extend(records)
if len(records) < limit:
break
offset += limitBest Practice: When fetching all records, add delays between requests to respect rate limits.
Next: Learn about Errors →