List endpoints support limit/offset pagination to efficiently handle large datasets.
| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
limit | integer | 100 | 100 | Number of records to return per page (1-100) |
offset | integer | 0 | - | Number of records to skip before starting to return results |
Maximum Limit: The limit parameter is capped at 100. If you request more than 100 items, the API will return 100 items.
- 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/public/v1/invoices" \
-H "X-API-KEY: your_api_key_here"
# Custom page size
curl "https://api.dualentry.com/public/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/public/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.
Invalid pagination parameters will return a 400 Bad Request error:
| Invalid Request | Error Message |
|---|---|
limit=0 | Input should be greater than or equal to 1 |
limit=-1 | Input should be greater than or equal to 1 |
offset=-1 | Input should be greater than or equal to 0 |
Note: Requesting limit > 100 will not return an error. The limit will be silently capped at 100.
Example error response:
{
"success": false,
"errors": {
"__all__": ["greater_than_equal query.limit: Input should be greater than or equal to 1"]
}
}Next: Learn about Errors →