Product / Deal relationship


I am currently working on an app for pipedrive, it does require to get the relational link between the products and the deal.

I am aware that we can get it from deals/:id/products or products/:id/deals, but scanning the organizations will result in a spammy and slow behavior.

Am I missing something to get this relation ?

Welcome to the community @Aymeric_Henry :wave:

Indeed we offer two ways for it: the GET /deals/{id}/products endpoints is for retrieving the products attached to a specified deal and GET /products/{id}/deals works the other way round - for getting the deals that a specified product is attached to.

Could you elaborate on “scanning the organizations will result in a spammy and slow behavior”? Which endpoint seems to be slow and what is the response time?

Thanks for your answer Helena,

Our application will need to get wich product compose the total of the amount on each deal, to get this information we can only use GET /deals/{id}/products as we need this informations:

            "product_variation_id": null,
            "item_price": 10,
            "discount_percentage": 0,

We will scan multiple large organization, meaning that without another endpoint to retrieve a list of this information at least every day we will make (number of deal by organization ~ 300) * ( nb of organization ~ 35 ). More than 10K daily call without counting the setup of the organization, seems slow and uneffective.


The two endpoints mentioned in my previous comment are currently the only ways to get detailed deal-product info via API. The GET /deals endpoint does return every deal’s value, weighted_value and products_count, but it doesn’t show which products exactly make up the total value of the deal, so does not seem to match your use-case.

If it’s something you are doing daily, are you caching organisation information on your end? Or linking Pipedrive Org IDs to your own organisation lists? That’s what we do for our internal app. Each customer record has its Pipedrive org ID stored so I use that for lookup info.
Also do you need to update them all daily? Can you get a list of deals and see which changed since yesterday or your last scan and only check those? Are all 300 deals going to be updated every day?