Pagination

Guru Pay API endpoints that return lists of resources (e.g., transactions) support pagination to efficiently deliver large datasets in manageable chunks.

circle-info

Pagination metadata is included via custom HTTP response headers, not in the response body.

Headers

Header
Type
Description

X-Api-Total

integer

Total number of records.

X-Api-Per-Page

integer

Number of records returned on the current page.

X-Api-Has-More-Pages

boolean

Indicates if there are additional pages after this one.

X-Api-Current-Page

integer

Current page number (starts from 1).

Example Response Headers

X-Api-Total: 153
X-Api-Per-Page: 15
X-Api-Has-More-Pages: true
X-Api-Current-Page: 1

Example Usage

GET /api/v1/transactions?page=1

Authorization: Bearer YOUR_API_TOKEN

Best Practices

  • Always check X-Api-Has-More-Pages before making another request.

  • Avoid hardcoding limits - respect the X-Api-Per-Page value in case the backend changes.

Last updated

Was this helpful?