Common header parameters

Pagination and sorting

For APIs that return multiple records, optional pagination and sorting is available. It is recommended that pagination is used for API calls that may return large amounts of data. To see if pagination or sorting is supported for an API, refer to the Request section for each individual API.

 

In the HTTP request header, you can include page_info and specify the following pagination and sorting parameters:

 

Item Description

page_number

The requested page (if not specified, then page 1 is returned by default)

total_records_per_page

Total records per page (in general up to and including 200, although certain APIs may support to 500 records per page. If not specified, then 50 records are returned per page by default. For more information, refer to the API specification page.)

order_option The field by which to sort the returned results
order_by ASC Sort returned results by ascending order

DESC

Sort returned results by descending order

 

The response body contains the following pagination information:

Item Description

total_records

The total number of records.

total_page

For the requested total_records_per_page, this is the total number of pages required to transfer all of the records. This is equal to:

Int (total_records / total_records_per_page)

 

For example:

To:

 

add the following content to the request header:

 

"page_info": {"order_by": "package_name","order_option": "ASC","total_records_per_page": 10,"page_number" : 2}

 

If there are 1359 membership packages, then a total of int(1359 / 10) = 136 pages will be required.

Example request and response:

 

pagination_parameter.png

 

Related topics

Getting Started Guide

Authentication

Retrieving data from ACTIVE Net

Error handling

API rate limits

Versioning

Terms of Use