Report Pagination

Pagination is supported in both the Reporting API and the Custom Reporting API. This feature allows you to define the limit on the number of rows returned per page and divide the report results over several requests. This page goes over have to take advantage of this feature.

Step 1: Get the first page of results

To define the limit on the number of rows returned per page, use the pageSize parameter in the first API request.

For example:

curl -v -X GET https://sandbox.bluesnap.com/services/2/report/TransactionDetail?period=LAST_WEEK&pageSize=5 \
-H 'Content-Type: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
curl -v -X GET https://sandbox.bluesnap.com/services/2/report/dynamic/12141?period=THIS_MONTH&pageSize=50 \
-H 'Content-Type: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

Note: If you do not specify page size, the maximum size is 5,000 rows by default.

The response includes the report data and headers that indicate the token for the next page of results, the start row of the current response, and the total number of rows.

For example:

    next-page-token: bmV4dHBhZ2V0b2tlbg==
    start-row: 1
    total-row-count: 3019

Step 2: Get the next page of results

To get the next page of results, insert the value from next-page-token from the previous step into the query string. Optionally, you can include the format parameter. No other parameters are required.

For example:

curl -v -X GET https://sandbox.bluesnap.com/services/2/report/TransactionDetail?nextPageToken=bmV4dHBhZ2V0b2tlbg== \
-H 'Content-Type: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
curl -v -X GET https://sandbox.bluesnap.com/services/2/report/dynamic/12141?nextPageToken=bmV4dHBhZ2V0b2tlbg== \
-H 'Content-Type: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

Note: The last page of the results does not include the next-page-token header.