Pagination

Paginating requests for large object sets is highly recommended. CRM platform may truncate the result or timeout trying to gather the data for the requests that should return the large result sets. Applying pagination skillfully, you have a more reliable experience and get the results faster due to limiting the requests to a smaller amount of object at a time.

After sending a paginated request, the API will return some results as specified by a page_size parameter.

These parameters can be added to Get List of any CRM entity.

Option Description
page_size

EXAMPLE: ?page_size=25

A number of objects to return per page. The maximum and default figure for this parameter is described in a table below.

page

EXAMPLE: ?page=2

Some requests return the compact representations of objects, to protect the resources and accomplish the request efficiently. While other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should return for the objects.

Possible figures for page_size:

page_size Regular (without Cache) With Cache
Default value 25 25
Maximum value 50 1000

Data2CRM.API will return Response Code 200 and the empty array [], if there are no data in the selected range.

Check out the example of pagination in the request - get the second page up to 30 accounts:


# Request
curl -X GET \
     --header "Accept: application/json" \
     --header "X-API2CRM-USER-KEY: " \
     --header "X-API2CRM-APPLICATION-KEY: " \
    "https://api-2445581398133.apicast.io:443/v1/account?page_size=30&page=2"

# Response
HTTP/1.1 200
[
  ...
]

You can send this request via a sandbox on our interactive documentation. Try request now