I need a function that can make recursive API calls to the pipedrive (token will be provided) to get all records. I should be able to pass the URL to the function and it returns all Data as output.
Use: NodeJS v6.10.2, Promises is preferred over callback but will be OK with callback as well.
I will provide you the API token.
Abstract from Pipedrive documentation on how to fetch all data:
Pagination and Lists
Most of the lists/item collections are paginated. The parameters that control the pagination are 'start' and 'limit', indicating the desired offset and the items per page values. Within the response's 'additional_data' object, a 'pagination' object will be set upon pagination. The '[url removed, login to view]' will contain the given start and limit, as well as 'more_items_in_collection' flag, indicating whether there are more items that can be fetched after the current batch. When there are, 'next_start' will also be set which can be used for next offset pointer. Maximum 'limit' value is 500.
"How can I fetch all deals/people/organizations/etc?"
While there are more efficient ways of accessing data than fetching all items — such as searching by name or filtering — you can, however, fetch all items of any kind from the Pipedrive API. In order to fetch all deals (or any other listable items, really), you can use the pagination data of lists responses to issue multiple requests in a loop to fetch all deals. You would have to check the 'additional_data.pagination.more_items_in_collection' flag in the response, and issue an additional request — only increasing the 'start' property by the given 'limit'. For example, if your first request ran against &start=0&limit=50, you would have to make the next request with &start=50&limit=50 to get the next 50 items, and continue making requests until the 'more_items_in_collection' flag is false in the response.
8 freelancere byder i gennemsnit $247 på dette job
Hi I am Shafayat, I am an M.E.A.N. stack developer. I believe I can provide you exactly what you want and more. Let’s talk for a minute, you won’t regret it, I promise. Cheers
hi, i have very good hands on node and api calls . i have done a couple of projects in node. Allow me to work with you.i hope this will be the first step towards our long term business deals. THANKS,