Access deal location through API


I am trying to access the location for all deals so that I may plot them on a map. Does the API offer an endpoint that carries “deal location” information?


Hey @gniting
Not sure if this is exactly what you’re looking for, but if you GET the Deal details (!/Deals/get_deals_id) and if there’s an address connected here through Org/Person or an Address Field you’ve added to the Deal, you should be able to find it there.

Hi @David

Unfortunately, that does not work because the location information I am seeing through the API is the one that is updated by Pipedrive via it’s “Smart Contact Data Info” feature. Moreover, I am only looking for just “country” and even if the location field was one that was in the API, country is not separated. Also looks like custom fields are also not included in the deal details endpoint so even if we made a new custom field to capture country, it still would not be served up in the API.

Sorry for not getting back to you sooner.
You would need to do a bit of a workaround, but if you did add just the country to Deals as a custom field - Custom fields appear as long hashes in the resulting data. These hashes can be mapped against the ‘key’ value of dealFields.