<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get total closed won amount from report via API in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1154405#M82178</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/943862"&gt;@SVyas7&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the moment there does not appear to be a direct way to extract the value you see in a dashboard via the API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use the &lt;A href="https://developers.hubspot.com/docs/reference/api/crm/objects/deals#post-%2Fcrm%2Fv3%2Fobjects%2Fdeals%2Fsearch" target="_blank" rel="noopener"&gt;Deals API search endpoint&lt;/A&gt; and try to apply similar filters in your search query.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is an example filter query for a deal that is "closed won", between "2025-04-15 and 2025-05-15".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "dealstage",
          "operator": "EQ",
          "value": "closedwon"
        },
        {
          "propertyName": "closedate",
          "operator": "BETWEEN",
          "value": "2025-04-15T00:00:00Z", "highValue": "2025-05-15T23:59:59Z"
        }
      ]
    }
  ],
  "properties": ["amount"],
  "limit": 100
}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously if you have more than 100 deals, you will need to use the pagination&amp;nbsp;to retrieve all of them due to the limit of 100 per call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can create a simple function that would loop through the results and add the amount from each deal to get the total.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 May 2025 19:43:25 GMT</pubDate>
    <dc:creator>evaldas</dc:creator>
    <dc:date>2025-05-19T19:43:25Z</dc:date>
    <item>
      <title>Get total closed won amount from report via API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1154197#M82170</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a report on a dashboard that shows the total closed won amount for deals with certain filters applied. How can I extract this value using API?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 12:32:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1154197#M82170</guid>
      <dc:creator>SVyas7</dc:creator>
      <dc:date>2025-05-19T12:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get total closed won amount from report via API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1154405#M82178</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/943862"&gt;@SVyas7&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the moment there does not appear to be a direct way to extract the value you see in a dashboard via the API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use the &lt;A href="https://developers.hubspot.com/docs/reference/api/crm/objects/deals#post-%2Fcrm%2Fv3%2Fobjects%2Fdeals%2Fsearch" target="_blank" rel="noopener"&gt;Deals API search endpoint&lt;/A&gt; and try to apply similar filters in your search query.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is an example filter query for a deal that is "closed won", between "2025-04-15 and 2025-05-15".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "dealstage",
          "operator": "EQ",
          "value": "closedwon"
        },
        {
          "propertyName": "closedate",
          "operator": "BETWEEN",
          "value": "2025-04-15T00:00:00Z", "highValue": "2025-05-15T23:59:59Z"
        }
      ]
    }
  ],
  "properties": ["amount"],
  "limit": 100
}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously if you have more than 100 deals, you will need to use the pagination&amp;nbsp;to retrieve all of them due to the limit of 100 per call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can create a simple function that would loop through the results and add the amount from each deal to get the total.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 19:43:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1154405#M82178</guid>
      <dc:creator>evaldas</dc:creator>
      <dc:date>2025-05-19T19:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Get total closed won amount from report via API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1154440#M82180</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/53048"&gt;@evaldas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help here! I was able to use the search endpoint to get the list of deals and calculate the total amount for all filtered deals. However, each deal has a different currency type and the final amount value in the dashboard report is in Euros. Any idea how I can get the exact value as shown in the report?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I had another question and would greatlly appreciate your help. I have a report in a dashboard that shows lead conversion rate % value and another report that shows count of 'new' leads in the last 30 days. Can you help me know how I can get these values via the API?&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 21:30:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1154440#M82180</guid>
      <dc:creator>SVyas7</dc:creator>
      <dc:date>2025-05-19T21:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get total closed won amount from report via API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1154456#M82181</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/943862"&gt;@SVyas7&lt;/a&gt;&amp;nbsp;glad to hear the search worked for you. If you would like to standardize the amount to one currency, you could try using "amount_in_home_currency" instead of the "amount" property in the API call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that does not give you what you need, then you might need to also retrieve the "deal_currency_code" in addition to the amount and utilize another 3rd party API for currency conversion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the additional questions, to get the count of 'new' leads, you can do an API call to search contacts that match the lifecycle stage of lead and set the create date to 30 days ago.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/crm/v3/objects/contacts/search&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "lifecyclestage",
          "operator": "EQ",
          "value": "lead"
        },
        {
          "propertyName": "createdate",
          "operator": "GTE",
          "value": "2025-04-19T00:00:00Z"
        }
      ]
    }
  ],
  "properties": ["firstname", "email", "createdate", "lifecyclestage"],
  "limit": 100
}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the conversion % value - I am not sure. I woud suggest posting another question in the forum with that specific question to see if anyone else has ideas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 22:30:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1154456#M82181</guid>
      <dc:creator>evaldas</dc:creator>
      <dc:date>2025-05-19T22:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get total closed won amount from report via API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1157224#M82293</link>
      <description>&lt;P&gt;The HubSpot API doesn’t provide direct access to dashboard reports, but you can replicate this by exporting your data directly into a spreadsheet by connecting to an external tool like&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://app.hubspot.com/ecosystem/7039851/marketplace/apps/coefficient" target="_blank" rel="noopener"&gt;Coefficient&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;which can connect your HubSpot data directly to Google Sheets or Excel. You can apply filters similar to your report and automatically pull in the Closed Won total—no API scripting required. It’s a fast way to operationalize reporting and keep key metrics updated in real time.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 00:13:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-total-closed-won-amount-from-report-via-API/m-p/1157224#M82293</guid>
      <dc:creator>victoriahcw</dc:creator>
      <dc:date>2025-05-27T00:13:41Z</dc:date>
    </item>
  </channel>
</rss>

