Pagination

All top-level API resources have support for bulk fetches via "list" API methods. For example, you can list Actions, Partners, and Contracts, among others. As these requests typically generate large result sets, these results are paginated and share a common structure detailing how the pages are structured. By default, requests return page 1 (the first page) and 1,000 results per page (though this may differ by resource). You can override these defaults by using the parameters below:

Request Parameters


NameDescription
PageThe page you are requesting be returned. Page choice starts at 1. Page 1 will be returned if no Page is specified.
PageSizeSpecify how many objects should be returned on each page. If not specified, the resource default amount will be returned.

To make the pages easy to traverse, impact.com list APIs also preconfigure URIs that point to other pages of interest within the result set. See the full set of pagination response parameters below.

Response Attributes


NameDescription
@pageCurrent page number. Pages start at 1.
@numpagesTotal number of pages.
@pagesizeHow many entities are in each page.
@totalTotal number of entities in the list.
@startPosition in the overall list of the first item in this page. Zero indexed (first position is 0).
@endPosition in the overall list of the last item in this page. Zero indexed (first position is 0).
@uriURI of the current page.
@firstpageuriURI for the first page of this result set.
@nextpageuriURI for the next page in this result set.
@previouspageuriURI for the previous page in this result set.
@lastpageuriURI for the last page of this result set.

Example Pagination Request


curl 'https://api.impact.com/Advertisers/<AccountSID>/Actions' \
  -X GET \
  -u '<AccountSID>:<AuthToken>' \
  -H 'Accept: application/json' \
  -d 'CampaignId=1017' \
  -d 'PageSize=2000' \
  -d 'Page=2' \
  -G

Example Pagination Response


{
  "@page": "1",
  "@numpages": "1",
  "@pagesize": "100",
  "@total": "62",
  "@start": "0",
  "@end": "61",
  "@uri": "/Advertisers/...",
  "@firstpageuri": "/Advertisers/...",
  "@previouspageuri": "/Advertisers/...",
  "@nextpageuri": "/Advertisers/...",
  "@lastpageuri": "/Advertisers/...",
  "Actions": [
    {...},
    {...}
  ]
}

📘

Note:

After 2 October 2023, any requests made to the /Reports API endpoint that specify a page size other than 20,000 will return a page size of exactly 20,000 records. If any of your integrations with the /Reports API specifies a page size less than 20,000, we recommend either of the following updates:

  • Specify a PageSize of 20,000.
  • Remove the PageSize parameter from the request altogether.