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 ?