Pagination

All top-level API resources have support for bulk fetches through “list” API methods. For example, you can list customers or list opportunities. These list API methods share a common structure and accept, at a minimum, the following three parameters: limit, startingAfter, and endingBefore.

Parameters

  • limit (default = 10)

    This specifies a limit on the number of objects to return.

  • startingAfter

    A cursor to use in pagination. startingAfter is an object ID that defines your place in the list. Use startingAfter to returns objects listed after the named object.

  • endingBefore

    A cursor to use in pagination. endingBefore is an object ID that defines your place in the list. Use endingBefore to returns objects listed before the named object.

circle-info

You can use either the startingAfter or endingBefore parameter, but not both simultaneously.

List Response Format

{
    "hasMore": false,
    "data": []
}
  • hasMore

    Whether or not there are more elements available after this set.

  • data

    An array containing the actual response elements, ordered by creation date in descending order and paginated according to the request parameters.

Last updated