Getting all product variants for all deals

I’m looking for an efficient way to retrieve a list of all deals and their products with variations.

I can do the following:

GET /products to get all products
Loop through each, and…
GET /products/{id}/deals

to get the deals for every product. This is very expensive to run.

Is there a more efficient way to get all deals and their products with variations? If not, can the GET /deals endpoint be modified when returning all deals to also include include_product_data as a param, to include product data?

1 Like

This is also causing problems with the Stitch integration, as Pipedrive eventually throws a 500 error, I am guessing it is some sort of limit.

Hey @Keegan_Morrison and @martinveo,

Unfortunately I can’t offer an exact solution for what you’re dealing with, but the team behind our Products endpoint suggested searching them out using this method instead (which is slightly more efficient)

  • get deals Deals/getDeals
  • loop through deals and get products attached to a deal Deals/getDealProducts

Thanks @David , that’s the solution I came up after I wrote this post a few years ago. However we have almost 60,000 deals, so you can imagine that this process is very slow. If the get/deals endpoint could accept include_product_data that would be many orders of magnitude more efficient.

1 Like