Skip to main content

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

ParameterRequiredTypeDefaultDescription
pagefalseinteger1Page number of the results to return.
sizefalseinteger20Number 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

AttributeTypeDescription
paginationpagination metadataPagination metadata for the response
dataarrayQuery results of the request. See list endpoint resource for response schema definition

Offset Pagination Metadata Object

AttributeTypeDescription
total_itemsintegerTotal number of items in the Tenant
page_numberintegerCurrent page number. Should match page query parameter.
page_sizeintegerThe size of each page. Should match size query parameter.
total_pagesintegerThe total number of pages.