Most of the endpoints of the API returning a large number of resources are paginated. For example Read all customers, Read all subscriptions, etc. These API endpoints share common request parameters and response structures.
Page-based pagination
Loop API uses page-based pagination to retrieve data in manageable chunks. You can specify the page number and the size of the page to control the amount of data returned in each request. The response includes information about whether there are additional pages of data to retrieve.
Request Parameters :
Parameter | Type | Description |
---|---|---|
pageNo | int32 | The number of the page to retrieve. Starts from 1 for the first page. |
pageSize | string | The number of items to retrieve per page. The maximum value allowed is 50. |
Response Parameters :
Parameter | Type | Description |
---|---|---|
success | boolean | Indicates whether the API request was successful. |
message | string | A message detailing the result of the request (e.g., success message). |
data | array | The actual data returned by the API (e.g., list of subscriptions). |
code | string | A code representing the result of the request, such as "SUCCESS". |
pageInfo | object | Object containing pagination-related information. |
pageInfo.hasNextPage | boolean | Indicates whether there is a subsequent page of data available. |
pageInfo.hasPreviousPage | boolean | Indicates whether there is a preceding page of data available. |
Response Example
{
"success": true,
"message": "Subscriptions fetched successfully",
"data": [....],
"code": "SUCCESS",
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": false
}
}