API Reference

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 :

ParameterTypeDescription
pageNoint32The number of the page to retrieve. Starts from 1 for the first page.
pageSizestringThe number of items to retrieve per page. The maximum value allowed is 50.

Response Parameters :

ParameterTypeDescription
successbooleanIndicates whether the API request was successful.
messagestringA message detailing the result of the request (e.g., success message).
dataarrayThe actual data returned by the API (e.g., list of subscriptions).
codestringA code representing the result of the request, such as "SUCCESS".
pageInfoobjectObject containing pagination-related information.
pageInfo.hasNextPagebooleanIndicates whether there is a subsequent page of data available.
pageInfo.hasPreviousPagebooleanIndicates 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
    }
}