<?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 API query to get open tickets in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/780269#M63029</link>
    <description>&lt;P&gt;I am looking to use MS Flow to get a count of the open tickets from each pipeline every day. We already have Flow connected and running some tasks, but the query to get open tickets from a pipeline is more complex that I would have hoped. Does anyone have an example of how I would submit the request to get the open tickets by Flow?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Apr 2023 09:55:27 GMT</pubDate>
    <dc:creator>RyanClark</dc:creator>
    <dc:date>2023-04-11T09:55:27Z</dc:date>
    <item>
      <title>API query to get open tickets</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/780269#M63029</link>
      <description>&lt;P&gt;I am looking to use MS Flow to get a count of the open tickets from each pipeline every day. We already have Flow connected and running some tasks, but the query to get open tickets from a pipeline is more complex that I would have hoped. Does anyone have an example of how I would submit the request to get the open tickets by Flow?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 09:55:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/780269#M63029</guid>
      <dc:creator>RyanClark</dc:creator>
      <dc:date>2023-04-11T09:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: API query to get open tickets</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/780581#M63057</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/137418"&gt;@RyanClark&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for reaching out. I do not have an MS Flow-specific example. I can provide an example of how to structure a similar request using the Search API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We'll also leave this open in case there are community members who have the app-specific steps you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 21:06:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/780581#M63057</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-04-11T21:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: API query to get open tickets</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/781305#M63114</link>
      <description>&lt;P&gt;Hi, it doesn't have to be Flow specific, but if someone can put an example together in cURL I can probably adapt that.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 09:13:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/781305#M63114</guid>
      <dc:creator>RyanClark</dc:creator>
      <dc:date>2023-04-13T09:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: API query to get open tickets</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/781726#M63150</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/137418"&gt;@RyanClark&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Here's my example using Postman:&lt;/P&gt;
&lt;P&gt;I have a pipeline with&amp;nbsp;open tickets&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2023-04-13 at 16.58.55.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/89161i1177D3A4571C7D5F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2023-04-13 at 16.58.55.png" alt="CleanShot 2023-04-13 at 16.58.55.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Request&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;POST https://api.hubapi.com/crm/v3/objects/tickets/search&lt;/LI-CODE&gt;
&lt;P&gt;Body&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "filterGroups": [
        {
            "filters": [
                {
                    "propertyName": "hs_pipeline",
                    "operator": "EQ",
                    "value": "19625033"
                },
                {
                    "propertyName": "hs_pipeline_stage",
                    "operator": "NEQ",
                    "value": "47925265"
                }
            ]
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;Response&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "total": 3,
    "results": [
        {
            "id": "1500746054",
            "properties": {
                "content": null,
                "createdate": "2023-03-16T15:48:45.014Z",
                "hs_lastmodifieddate": "2023-03-16T15:48:46.290Z",
                "hs_object_id": "1500746054",
                "hs_pipeline": "19625033",
                "hs_pipeline_stage": "47925262",
                "hs_ticket_category": null,
                "hs_ticket_priority": null,
                "subject": "Testerr 1"
            },
            "createdAt": "2023-03-16T15:48:45.014Z",
            "updatedAt": "2023-03-16T15:48:46.290Z",
            "archived": false
        },
        {
            "id": "1500746070",
            "properties": {
                "content": null,
                "createdate": "2023-03-16T15:49:04.683Z",
                "hs_lastmodifieddate": "2023-03-16T15:49:06.041Z",
                "hs_object_id": "1500746070",
                "hs_pipeline": "19625033",
                "hs_pipeline_stage": "47925262",
                "hs_ticket_category": null,
                "hs_ticket_priority": null,
                "subject": "Testerr 2"
            },
            "createdAt": "2023-03-16T15:49:04.683Z",
            "updatedAt": "2023-03-16T15:49:06.041Z",
            "archived": false
        },
        {
            "id": "1503346867",
            "properties": {
                "content": null,
                "createdate": "2023-03-17T22:27:14.029Z",
                "hs_lastmodifieddate": "2023-03-17T22:27:14.967Z",
                "hs_object_id": "1503346867",
                "hs_pipeline": "19625033",
                "hs_pipeline_stage": "47925262",
                "hs_ticket_category": null,
                "hs_ticket_priority": "HIGH",
                "subject": "Cats and ninjas"
            },
            "createdAt": "2023-03-17T22:27:14.029Z",
            "updatedAt": "2023-03-17T22:27:14.967Z",
            "archived": false
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My underlying thinking:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;we can do this&amp;nbsp;&lt;EM&gt;per&amp;nbsp;&lt;/EM&gt;pipeline&lt;/LI&gt;
&lt;LI&gt;our request will look for all tickets that are&amp;nbsp;&lt;STRONG&gt;not&lt;/STRONG&gt; Closed&lt;/LI&gt;
&lt;LI&gt;you could also filter by thinking of it the other way around, i.e. use all stages&amp;nbsp;&lt;EM&gt;except&amp;nbsp;&lt;/EM&gt;Closed. Whatever meets your needs.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Have fun building! — Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 23:00:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/781726#M63150</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-04-13T23:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: API query to get open tickets</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/783803#M63279</link>
      <description>&lt;P&gt;Hi, thanks very much for this. I have managed to get it into Flow and it is working. The only issue I have is that we have a pipeline with 3 closed states. If I try the query to search on that pipeline and exclude those 3 states. I get this error. Is there a way round that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Invalid input JSON on line 1, column 299: too many filters per filterGroup (count: 4, max allowed: 3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One last thing, can I also search on dates like 'Today' or 'Yesterday' as I can with ticket views?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 12:27:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/API-query-to-get-open-tickets/m-p/783803#M63279</guid>
      <dc:creator>RyanClark</dc:creator>
      <dc:date>2023-04-19T12:27:36Z</dc:date>
    </item>
  </channel>
</rss>

