<?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 tasks based on value date in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/848586#M67376</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/454088"&gt;@RCarvalho&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Has the correct create date property name solved your problem, or are you still experiencing an issue here?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2024 06:33:14 GMT</pubDate>
    <dc:creator>zach_threadint</dc:creator>
    <dc:date>2024-03-05T06:33:14Z</dc:date>
    <item>
      <title>get tasks based on value date</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/848307#M67351</link>
      <description>&lt;P&gt;Hi, I'm trying to get tasks based on date value.&lt;/P&gt;&lt;P&gt;I'm using this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    data = {
        'filterGroups': [
            {
                'filters': [
                    {
                        'propertyName': 'createdate',
                        'operator': 'GT',
                        'value': '2023-09-01T00:00:00Z',
                    },
                ],
            },
        ],
        "sorts": [""],
        "properties": ["hs_task_body","hs_task_priority","hs_task_status","hs_task_subject","hs_timestamp","hubspot_owner_id"],
        "limit" : "100",
        "after": afterp
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;headers = {"Authorization": "Bearer "+token}&lt;BR /&gt;response = requests.post('&lt;A href="https://api.hubapi.com/crm/v3/objects/tasks/search" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/tasks/search&lt;/A&gt;', headers=headers, json=data)&lt;BR /&gt;&lt;BR /&gt;but my response is giving this:&lt;/P&gt;&lt;P&gt;{"status":"error","message":"There was a problem with the request.","correlationId":"8aa1e3ee-7ec7-431a-b441-65d9d8336c64"}&lt;BR /&gt;&lt;BR /&gt;Someone can help me?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 15:05:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/848307#M67351</guid>
      <dc:creator>RCarvalho</dc:creator>
      <dc:date>2023-09-12T15:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: get tasks based on value date</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/848372#M67354</link>
      <description>&lt;P&gt;Just found out that I was using the wrong default properties name to createdate. The correct in that case is:&lt;BR /&gt;hs_createdate&lt;BR /&gt;&lt;BR /&gt;So:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  data = {
        'filterGroups': [
            {
                'filters': [
                    {
                        'propertyName': 'hs_createdate',
                        'operator': 'GT',
                        'value': '2023-09-01T00:00:00Z',
                    },
                ],
            },
        ],
        "sorts": [""],
        "properties": ["hs_task_body","hs_task_priority","hs_task_status","hs_task_subject","hs_timestamp","hubspot_owner_id"],
        "limit" : "100",
        "after": afterp
    }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 16:53:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/848372#M67354</guid>
      <dc:creator>RCarvalho</dc:creator>
      <dc:date>2023-09-12T16:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: get tasks based on value date</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/848380#M67355</link>
      <description>&lt;P&gt;Does anyone knows how to get the deal ID from this call that I've made?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 17:09:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/848380#M67355</guid>
      <dc:creator>RCarvalho</dc:creator>
      <dc:date>2023-09-12T17:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: get tasks based on value date</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/848586#M67376</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/454088"&gt;@RCarvalho&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Has the correct create date property name solved your problem, or are you still experiencing an issue here?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 06:33:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/848586#M67376</guid>
      <dc:creator>zach_threadint</dc:creator>
      <dc:date>2024-03-05T06:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: get tasks based on value date</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/849211#M67429</link>
      <description>&lt;P&gt;Yes. I need to get the deal ID from tha task that I've recorver. How can I do that?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 21:09:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/849211#M67429</guid>
      <dc:creator>RCarvalho</dc:creator>
      <dc:date>2023-09-13T21:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: get tasks based on value date</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/849243#M67433</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/454088"&gt;@RCarvalho&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As far as I'm aware, you'll need to perform another request. I recommend the batch read associations endpoint, which you can find within &lt;A href="https://developers.hubspot.com/docs/api/crm/associations" target="_blank" rel="noopener"&gt;this documentation&lt;/A&gt;. Here's an example request:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt;&amp;nbsp;&lt;A href="https://api.hubapi.com" target="_blank" rel="noopener"&gt;https://api.hubapi.com&lt;/A&gt;&lt;SPAN&gt;/crm/v4/associations/TASK/DEAL/batch/read&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;Headers&lt;/STRONG&gt;:&lt;/SPAN&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Content-Type:&amp;nbsp;application/json&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Authorization: Bearer &lt;EM&gt;{{your_access_token}}&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;Request Body (JSON)&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "inputs": [
        {
            "id": "123"
        },
        {
            "id": "456"
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#333333"&gt;&amp;nbsp;Where "123" and "456" are example Task IDs.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here's an example of the response you should expect:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "status": "COMPLETE",
    "results": [
        {
            "from": {
                "id": "123"
            },
            "to": [
                {
                    "toObjectId": 987,
                    "associationTypes": [
                        {
                            "category": "HUBSPOT_DEFINED",
                            "typeId": 216,
                            "label": null
                        }
                    ]
                }
            ]
        },
        {
            "from": {
                "id": "456"
            },
            "to": [
                {
                    "toObjectId": 987,
                    "associationTypes": [
                        {
                            "category": "HUBSPOT_DEFINED",
                            "typeId": 216,
                            "label": null
                        }
                    ]
                }
            ]
        }
    ],
    "startedAt": "2023-09-13T23:16:03.085Z",
    "completedAt": "2023-09-13T23:16:03.095Z"
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where 987 is the example Deal ID you're looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this proves useful. Please let me know if you have any follow-up questions.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 06:33:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/get-tasks-based-on-value-date/m-p/849243#M67433</guid>
      <dc:creator>zach_threadint</dc:creator>
      <dc:date>2024-03-05T06:33:41Z</dc:date>
    </item>
  </channel>
</rss>

