Parameter to show total count of results

Is there a way to show the total count of registers from some request?

https://api.pipedrive.com/v1/deals?api_token=a098d7d8d...0a0sd9kjzxm&start=0&limit=2&BETTER_SUMMARY=TRUE

pagination: {
      start: 0,
      limit: 2,
      more_items_in_collection: true,
      next_start: 2
},
SUMMARY: {
      total: 666,
      pages: 333
}

You could use

&get_summary=1

This should add a ‘summary’ block under ‘additional _data’

"additional_data": {
"summary": {
"values_total": {
"USD": {
"value": 12,
"count": 1,
"value_converted": 12,
"value_formatted": "$12",
"value_converted_formatted": "$12"
}
},
"weighted_values_total": {
"USD": {
"value": 12,
"count": 1,
"value_formatted": "$12"
}
},
"total_count": 1,
"total_currency_converted_value": 12,
"total_currency_converted_value_formatted": "$12"
},
"pagination": {
"start": 0,
"limit": 100,
"more_items_in_collection": false
}
},
1 Like

Thanks for the reply but it doesn’t help much. I was searching for some method to get the total count of registers to process.

Imagine that you have a user waiting something to get done… But you can’t show anything else than a hourglass because you don’t have anything to compare how much was processed and how much more are on the pipe.

Yeah, I missed the mark on that.
We also have separate endpoints dedicated to summary alone, would this be more helpful or more what you’re thinking?

https://reliable-fold.pipedrive.com/api/v1/deals/summary?session_token=TOKEN&strict_mode=true&everyone=1`

same query parameters as list can be used ala ‘filter_id=1’ to get summary about filter id = 1 deals

So you’re saying that I have no way to know what I need to know with the https://api.pipedrive.com/v1/ endpoint and so I need to use an undocumented endpoint with a session_token that I don’t have, right?!

There must be a way to do this without ask for username and password to the users that already give me the api token.

If the URL contains ‘api’ then you can use api.pipedrive.com/v1 url with api tokens

Ok. So, how do I proceed to work with that URL? https://reliable-fold.pipedrive.com/api/v1/deals/summary?session_token=TOKEN&strict_mode=true&everyone=1

I’m logged, so where do I get the session_token?

Disregarding the session_token, have you tried using
https://api.pipedrive.com/v1/deals/summary?start=0&api_token=API_TOKEN instead and then adding the same parameters that are listed for
https://developers.pipedrive.com/docs/api/v1/#!/Deals/get_deals

Or would that summary not give you the exact details you’re looking for still?

1 Like