Pagination
Most Get All
endpoints support pagination to allow bulk fetching multiple items. Each Get All
endpoint shares a common response structure.
Offset Pagination
Request
curl "https://api.publicsquare.com/payments?page=2&size=10" \
-H "X-API-KEY: <API_KEY>"
Query Parameters
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
page | false | integer | 1 | Page number of the results to return. |
size | false | integer | 20 | Number of results per page to return. Maximum size of 100 results. |
Response
{
"pagination": {
"total_items": 924,
"page_number": 2,
"page_size": 10,
"total_pages": 93
},
"data": [
{...},
{...},
{...}
]
}
Offset Pagination Object
Attribute | Type | Description |
---|---|---|
pagination | pagination metadata | Pagination metadata for the response |
data | array | Query results of the request. See list endpoint resource for response schema definition |
Offset Pagination Metadata Object
Attribute | Type | Description |
---|---|---|
total_items | integer | Total number of items in the Tenant |
page_number | integer | Current page number. Should match page query parameter. |
page_size | integer | The size of each page. Should match size query parameter. |
total_pages | integer | The total number of pages. |