Search organization by multiple IDs

I am trying to use the API to fetch all organizations whose ID is in a given array.

For example :

  • I have 6 companies in my Pipedrive account with IDs [1, 2, 3, 4, 5, 6]
  • In the most efficient way possible, I want to fetch companies with IDs [1, 2, 4, 6]

I can’t find a fine way to do this.

  • itemSearch endpoint does not seem to support search by ID, nor multiple terms search.
  • Creating a filter from which I could search all org matching that filter does not seem to work either since creating a filter based on IDs does not seem possible
  • Fetch each org one by one would work but isn’t efficient at all in terms of performance

Are my three assumptions above-mentioned right ? If they are, do you have any suggestion in order to achieve the expected objective ?

Hey @julienc
Thanks for adding all the relevant details to the description. I am afraid that this is not possible

I agree with this point. However, we don’t have an alternative yet. Nevertheless, please keep an eye on our changelog for relevant updates :slight_smile:

Hi @Hem, thank you very much for your reply !

So I feel like am not going to be able to achieve my goal.

Now let’s say that instead of using IDs, I am using names.

For example :

  • I have 6 companies in my Pipedrive account with names ["RedBull", "Ferrari", "Alpine", "McLaren, "Alpha Romeo", "Haas"]
  • In the most efficient way possible, I want to fetch companies with names ["Redbull, "Ferrari"]

Again, I’m afraid this is not possible either.

  • itemSearch would allow me to search by only one name
  • filter would allow me to add a condition for each name, but has a maximum of 16 conditions
  • once again, the only working, but costly solution would be to fetch each company one by one

What do you think @Hem ? Do you have any alternative in mind ?

I’m just gonna chime in here by saying that the lack of this functionality has been the bane of our existence for years.
No way to fetch multiple specific objects and no way to include details of orgs/persons etc. when fetching deals.

Here’s the workaround we’ve been using extensively:

  1. Have the program create a filter that finds these organisations by the filters endpoint.
  2. Fetch your orgs/deals/whatever from that filter.
  3. Delete the filter.

This is all possible via the api, although obviously not useful in every use case.
It is also kind of inefficient, fragile, slow and prone to resulting in weird behaviour (like random filters that got left behind cause they weren’t deleted for whatever reason).

So Pipedrive, Please. Let. Us. Bulk. Fetch.

1 Like