Contents
Changelog
March 21, 2023
GET endpoints for Activities and Deals APIAnnounced: March 21, 2023
March 21, 2023
We are introducing two new endpoints with cursor-based pagination for Activities and Deals API to give you an improved user experience when paging through large data sets:
GET /activities/collection– for querying all activitiesGET /deals/collection– for querying all deals
The pagination logic for these endpoints is controlled by the cursor and limit query parameters:
cursor– A marker (an opaque string value) representing the first item on the next pagelimit– the limit of entries to be returned
Within the response’s additional_data object, the next_cursor field is returned, indicating the first item on the next page.
Note: Only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
Example response schema for the GET /activities/collection endpoint:
{
"success": true,
"data": [
{
"id": 1,
"creator_user_id": 42,
"user_id": 42,
"person_id": 47,
"org_id": 42,
"stage_id": 1,
"title": "New name for a great deal",
"value": 1000000,
"currency": "EUR",
"add_time": "2022-01-04 10:44:11",
"update_time": "2022-09-27 13:21:10",
"status": "open",
"probability": 50,
"lost_reason": null,
"visible_to": "7",
"close_time": null,
"pipeline_id": 2,
"won_time": null,
"lost_time": null,
"expected_close_date": null,
"label": null,
}
],
"additional_data": {
"next_cursor": "eyJkZWFscyI6Mn0"
}
}
For additional information about pagination in the Pipedrive API, please refer to our developer documentation here.
What is the benefit of the new endpoints?
Until now, most of the GET endpoints of Pipedrive’s API have supported offset-based pagination. We are introducing the two new GET endpoints with cursor-based pagination to ensure reliable response times and a better experience when paging through large sets of entities.
We are planning to roll out cursor-based pagination for the other main entities (e.g., Persons and Organizations API) in the near future.
If you have any questions or comments, let us know in our Developers’ Community!