<?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 a trail of pipeline stages that a ticket has gone through in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752712#M61185</link>
    <description>&lt;P&gt;Hi Ludwig,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one more question.&lt;/P&gt;&lt;P&gt;If I want to get the pipeline stages of all tickets created between X and Y all at once, is there another API endpoint that I can use instead of using the above and changing the ticket ID again and again?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2023 12:19:47 GMT</pubDate>
    <dc:creator>JohnWongCK</dc:creator>
    <dc:date>2023-02-07T12:19:47Z</dc:date>
    <item>
      <title>Get a trail of pipeline stages that a ticket has gone through</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752530#M61170</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to get a trail of pipeline stages that a ticket has gone through using python code. Which API endpoint should I use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, Ticket_ID = 12345 in "Call Centre Ticket Board"&lt;/P&gt;&lt;P&gt;&amp;gt; 1 Jan 2023: Pipeline stage created as "New"&lt;/P&gt;&lt;P&gt;&amp;gt; 3 Jan 2023: Pipeline stage updated to "Waiting on contacts"&lt;/P&gt;&lt;P&gt;&amp;gt; 10 Jan 2023: Pipeline stage updated to "Waiting on us"&lt;/P&gt;&lt;P&gt;&amp;gt; 20 Jan 2023: Pipeline stage updated to "Waiting on contacts"&lt;/P&gt;&lt;P&gt;&amp;gt; 21 Jan 2023: Pipeline stage updated to "Closed"&lt;/P&gt;&lt;P&gt;I would like to get all the pipeline stages above, not just the last one on 21 Jan 2023.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I these API endpoints, I can only get the last pipeline stage.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;URL&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://api.hubapi.com/crm/v3/objects/tickets/12345" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/tickets/12345&lt;/A&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;URL&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://api.hubapi.com/crm/v3/objects/tickets/search" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/tickets/search&lt;/A&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you for your help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;John&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Feb 2023 03:03:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752530#M61170</guid>
      <dc:creator>JohnWongCK</dc:creator>
      <dc:date>2023-02-07T03:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get a trail of pipeline stages that a ticket has gone through</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752624#M61177</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/484974"&gt;@JohnWongCK&lt;/a&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can add the query parameter "propertiesWithHistory=dealstage" in your GET call to the deals endpoint to include the history of the deal stages as well as timestamps :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;GET&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN data-offset-key="9tesd-0-0"&gt;{{Hubspot API}}&lt;SPAN data-offset-key="9tesd-1-0"&gt;/crm/v3/objects/deals/[INSERT_DEAL_ID_HERE]?propertiesWithHistory=dealstage&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "id": "11555711869",
    "properties": {
        "amount": "1000",
        "closedate": "2023-02-07T05:00:00Z",
        "createdate": "2023-01-02T17:14:36.790Z",
        "dealname": "Big Opp",
        "dealstage": "df327ce6-4ada-4429-b555-c1d24fc9ba88",
        "hs_lastmodifieddate": "2023-02-07T09:21:12.616Z",
        "hs_object_id": "11555711869",
        "pipeline": "fde9427f-a98a-4d49-a9f4-2f22bef770cc"
    },
    "propertiesWithHistory": {
        "dealstage": [
            {
                "value": "df327ce6-4ada-4429-b555-c1d24fc9ba88",
                "timestamp": "2023-02-07T09:21:09.171Z",
                "sourceType": "CRM_UI",
                "sourceId": "userId:26386356",
                "updatedByUserId": 26386356
            },
            {
                "value": "e04ad861-4350-4cb6-beb1-a82e7a7d1198",
                "timestamp": "2023-02-07T09:21:07.330Z",
                "sourceType": "CRM_UI",
                "sourceId": "userId:26386356",
                "updatedByUserId": 26386356
            },
            {
                "value": "4df7402e-19c8-4a93-953b-aa3f27572ee4",
                "timestamp": "2023-02-07T09:21:04.746Z",
                "sourceType": "CRM_UI",
                "sourceId": "userId:26386356",
                "updatedByUserId": 26386356
            },
            {
                "value": "b8551ba8-a6f1-4abb-a154-4cf1b75a0045",
                "timestamp": "2023-02-07T09:21:02.233Z",
                "sourceType": "CRM_UI",
                "sourceId": "userId:26386356",
                "updatedByUserId": 26386356
            },
            {
                "value": "3ceaf523-57eb-4f58-a9eb-8a001abce581",
                "timestamp": "2023-02-07T09:20:59.527Z",
                "sourceType": "CRM_UI",
                "sourceId": "userId:26386356",
                "updatedByUserId": 26386356
            },
            {
                "value": "fc86fda4-d9d2-4ef2-ac8e-46f12fde7a84",
                "timestamp": "2023-02-07T09:20:56.907Z",
                "sourceType": "CRM_UI",
                "sourceId": "userId:26386356",
                "updatedByUserId": 26386356
            },
            {
                "value": "9fd3c833-3c52-488a-ad60-38bcffef1b98",
                "timestamp": "2023-02-07T09:16:22.504Z",
                "sourceType": "CRM_UI",
                "sourceId": "userId:26386356",
                "updatedByUserId": 26386356
            },
            {
                "value": "ce1614b3-0a18-4fc6-a714-f0ca9795a49e",
                "timestamp": "2023-01-02T17:14:36.790Z",
                "sourceType": "SALESFORCE"
            }
        ]
    },
    "createdAt": "2023-01-02T17:14:36.790Z",
    "updatedAt": "2023-02-07T09:21:12.616Z",
    "archived": false
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see in the example above, there are 9 values for the property "dealstage", you'll need to get the id of the different stages to get the stage name though.&lt;/P&gt;
&lt;P&gt;I tested up to 9 property changes for the same property and as you can see they're all present in the API response so I'd say that's pretty safe but if you feel like you'll need more than that, you should test a higher max just to be sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps !&lt;BR /&gt;If it does, please consider marking this answer as a solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Ludwig&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 09:24:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752624#M61177</guid>
      <dc:creator>LMeert</dc:creator>
      <dc:date>2023-02-07T09:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Get a trail of pipeline stages that a ticket has gone through</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752710#M61184</link>
      <description>&lt;P&gt;Hi Ludwig,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your solution.&lt;/P&gt;&lt;P&gt;Since I am looking at tickets, I replaced "dealstage" with "hs_pipeline_stage".&lt;/P&gt;&lt;P&gt;It worked perfectly and I have verified the history with the movement of the same ticket.&lt;/P&gt;&lt;P&gt;Great to learn from you.&lt;/P&gt;&lt;P&gt;Have a good day!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 12:14:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752710#M61184</guid>
      <dc:creator>JohnWongCK</dc:creator>
      <dc:date>2023-02-07T12:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get a trail of pipeline stages that a ticket has gone through</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752712#M61185</link>
      <description>&lt;P&gt;Hi Ludwig,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one more question.&lt;/P&gt;&lt;P&gt;If I want to get the pipeline stages of all tickets created between X and Y all at once, is there another API endpoint that I can use instead of using the above and changing the ticket ID again and again?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 12:19:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752712#M61185</guid>
      <dc:creator>JohnWongCK</dc:creator>
      <dc:date>2023-02-07T12:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Get a trail of pipeline stages that a ticket has gone through</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752720#M61187</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/484974"&gt;@JohnWongCK&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Well, you can batch request several tickets but you'll have to use a property with a unique value to do so (ticket ID or else), check out this endpoint from the &lt;A href="https://developers.hubspot.com/docs/api/crm/tickets" target="_blank" rel="noopener"&gt;tickets API page&lt;/A&gt; :&amp;nbsp;&lt;STRONG&gt;/crm/v3/objects/tickets/batch/read&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use two calls then :&lt;BR /&gt;- a &lt;A href="https://developers.hubspot.com/docs/api/crm/search" target="_blank" rel="noopener"&gt;search the CRM&lt;/A&gt; call to get all tickets within a certain timeframe&lt;/P&gt;
&lt;P&gt;- a &lt;A href="https://developers.hubspot.com/docs/api/crm/tickets" target="_blank" rel="noopener"&gt;batch read&lt;/A&gt; on all the ticket IDs returned&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps !&lt;BR /&gt;If it does, please consider marking this answer as a solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Ludwig&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 12:41:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752720#M61187</guid>
      <dc:creator>LMeert</dc:creator>
      <dc:date>2023-02-07T12:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get a trail of pipeline stages that a ticket has gone through</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752749#M61189</link>
      <description>&lt;P&gt;Thank you once again, Ludwig. Let me try it tomorrow. I am confident that your solution will work. Have a great day :).&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 13:32:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/752749#M61189</guid>
      <dc:creator>JohnWongCK</dc:creator>
      <dc:date>2023-02-07T13:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get a trail of pipeline stages that a ticket has gone through</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/753104#M61220</link>
      <description>&lt;P&gt;Hi Ludwig,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to close the loop.&lt;/P&gt;&lt;P&gt;Your solution worked.&lt;/P&gt;&lt;P&gt;Now I just have to figure out how to put everything together in python.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For completeness, here is the code that I used to test:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;URL&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://api.hubapi.com/crm/v3/objects/tickets/batch/read" target="_blank"&gt;https://api.hubapi.com/crm/v3/objects/tickets/batch/read&lt;/A&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;HEADER&lt;/SPAN&gt;&lt;SPAN&gt; = {&lt;/SPAN&gt;&lt;SPAN&gt;'content-type'&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;SPAN&gt;'application/json'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'authorization'&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;SPAN&gt;'Bearer '&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;access_token&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PARAM&lt;/SPAN&gt;&lt;SPAN&gt; = {&lt;/SPAN&gt;&lt;SPAN&gt;'properties'&lt;/SPAN&gt;&lt;SPAN&gt; : ['subject',&lt;/SPAN&gt;&lt;SPAN&gt;'hs_object_id'&lt;/SPAN&gt;&lt;SPAN&gt;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gt;&lt;SPAN&gt;url&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;URL&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;headers&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;HEADER&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;json&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;PARAM&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Have a great day and week ahead &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;John&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2023 01:58:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-a-trail-of-pipeline-stages-that-a-ticket-has-gone-through/m-p/753104#M61220</guid>
      <dc:creator>JohnWongCK</dc:creator>
      <dc:date>2023-02-08T01:58:19Z</dc:date>
    </item>
  </channel>
</rss>

