<?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 Returned field format different for webhook and API in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Returned-field-format-different-for-webhook-and-API/m-p/956635#M72588</link>
    <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;in line_items object&lt;BR /&gt;hs_recurring_billing_start_date field is returned in API as&amp;nbsp;"2024-04-27" while with webhook as "1714176000000".&lt;BR /&gt;&lt;BR /&gt;Can we fix this to be returned with the same format from both API and webhook?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 08 Apr 2024 14:51:32 GMT</pubDate>
    <dc:creator>ASpyropoulos</dc:creator>
    <dc:date>2024-04-08T14:51:32Z</dc:date>
    <item>
      <title>Returned field format different for webhook and API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Returned-field-format-different-for-webhook-and-API/m-p/956635#M72588</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;in line_items object&lt;BR /&gt;hs_recurring_billing_start_date field is returned in API as&amp;nbsp;"2024-04-27" while with webhook as "1714176000000".&lt;BR /&gt;&lt;BR /&gt;Can we fix this to be returned with the same format from both API and webhook?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 14:51:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Returned-field-format-different-for-webhook-and-API/m-p/956635#M72588</guid>
      <dc:creator>ASpyropoulos</dc:creator>
      <dc:date>2024-04-08T14:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Returned field format different for webhook and API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Returned-field-format-different-for-webhook-and-API/m-p/957185#M72607</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/706950"&gt;@ASpyropoulos&lt;/a&gt;&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to the Community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was researching this topic and came across a solution from &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/111325"&gt;@karstenkoehler&lt;/a&gt;&lt;/SPAN&gt; to a similar question in the Community: &lt;A href="https://community.hubspot.com/t5/Lists-Lead-Scoring-Workflows/Workflow-quot-Send-a-Webhook-quot-is-sending-wrong-data/td-p/890086" target="_blank"&gt;Workflow "Send a Webhook" is sending wrong data&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Could you take a look to see if this helps with answering your question?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Diana&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 11:43:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Returned-field-format-different-for-webhook-and-API/m-p/957185#M72607</guid>
      <dc:creator>DianaGomez</dc:creator>
      <dc:date>2024-04-09T11:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Returned field format different for webhook and API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Returned-field-format-different-for-webhook-and-API/m-p/957314#M72618</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/706950"&gt;@ASpyropoulos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You have to format the date because the webhook returns the date in timestamp format:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, if you are using NodeJs then you have to use the following statements for date formatting:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let date=new Date(1714176000000);
let formatDate=date.getFullYear() + "-" + ("0" + (date.getMonth() + 1)).slice(-2) + "-" + ("0" + (date.getDate())).slice(-2);&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope this will help you out. Please mark it as &lt;STRONG&gt;Solution Accepted and upvote&lt;/STRONG&gt; to help another Community member.&lt;BR /&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 15:13:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Returned-field-format-different-for-webhook-and-API/m-p/957314#M72618</guid>
      <dc:creator>GRajput</dc:creator>
      <dc:date>2024-04-09T15:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Returned field format different for webhook and API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Returned-field-format-different-for-webhook-and-API/m-p/957838#M72640</link>
      <description>&lt;P&gt;If you're using Node and you have the Luxon package you can use something like:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Import the DateTime object from Luxon
const { DateTime } = require('luxon');

// Create a timestamp in milliseconds
const timestamp = 1654848000000;

// Create a DateTime object from the timestamp
const date = DateTime.fromMillis(timestamp);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://www.npmjs.com/package/luxon" target="_blank"&gt;https://www.npmjs.com/package/luxon&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 12:54:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Returned-field-format-different-for-webhook-and-API/m-p/957838#M72640</guid>
      <dc:creator>dsmarion</dc:creator>
      <dc:date>2024-04-10T12:54:03Z</dc:date>
    </item>
  </channel>
</rss>

