<?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: &amp;quot;days_to_close&amp;quot; is a read only property; its value cannot be set in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/quot-days-to-close-quot-is-a-read-only-property-its-value-cannot/m-p/773075#M62539</link>
    <description>&lt;P&gt;&lt;SPAN&gt;closedate was what I was looking for, thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2023 15:37:50 GMT</pubDate>
    <dc:creator>dan9</dc:creator>
    <dc:date>2023-03-23T15:37:50Z</dc:date>
    <item>
      <title>"days_to_close" is a read only property; its value cannot be set</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/quot-days-to-close-quot-is-a-read-only-property-its-value-cannot/m-p/771930#M62448</link>
      <description>&lt;P&gt;I'm trying to modify the&amp;nbsp;&lt;SPAN&gt;Close Date of deals but I get this error message:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"days_to_close" is a read only property; its value cannot be set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it not possible to do that?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 18:37:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/quot-days-to-close-quot-is-a-read-only-property-its-value-cannot/m-p/771930#M62448</guid>
      <dc:creator>dan9</dc:creator>
      <dc:date>2023-03-21T18:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: "days_to_close" is a read only property; its value cannot be set</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/quot-days-to-close-quot-is-a-read-only-property-its-value-cannot/m-p/772010#M62452</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/533349"&gt;@dan9&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; You are not missing anything. Properties marked read-only cannot be modified. By making a request to the &lt;A href="https://developers.hubspot.com/docs/api/crm/properties" target="_blank" rel="noopener"&gt;Properties API&lt;/A&gt;, we can get more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, “days_to_close” is a &lt;A href="https://knowledge.hubspot.com/crm-setup/create-calculation-properties" target="_blank" rel="noopener"&gt;calculation property&lt;/A&gt;.&amp;nbsp;Calculation properties are built from two or more properties. This is why you cannot edit the property. You may be able to edit one of the properties that make up the calculation, but not the calculation property itself — e.g. “closedate” or “createdate”.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example request and response:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Request&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;curl --request GET \
  --url 'https://api.hubapi.com/crm/v3/properties/0-3/days_to_close?archived=false' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Response&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;HTTP 200

{
  "updatedAt": "2022-05-27T23:45:00.102Z",
  "createdAt": "2019-08-06T02:41:52.984Z",
  "name": "days_to_close",
  "label": "Days to close",
  "type": "number",
  "fieldType": "calculation_equation",
  "description": "The number of days the deal took to close",
  "groupName": "dealinformation",
  "options": [],
  "displayOrder": -1,
  "calculated": false,
  "externalOptions": true,
  "hasUniqueValue": false,
  "hidden": true,
  "hubspotDefined": true,
  "showCurrencySymbol": false,
  "modificationMetadata": {
    "archivable": true,
    "readOnlyDefinition": true,
    "readOnlyValue": true
  },
  "formField": false,
  "calculationFormula": "max(0, round_down(((closedate - createdate) / 86400000), 0))"
}​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2023-03-21 at 14.31.59.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/87814iF3E602F8D21F6FAA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2023-03-21 at 14.31.59.png" alt="CleanShot 2023-03-21 at 14.31.59.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;If you need to edit a property like Days to Close, you'll need to consider creating a custom property and using a &lt;A href="https://knowledge.hubspot.com/account/property-field-types-in-hubspot" target="_blank" rel="noopener"&gt;date picker or single line text field-type&lt;/A&gt;. As there is not a method to get around the read-only flag for properties.&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, 21 Mar 2023 20:38:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/quot-days-to-close-quot-is-a-read-only-property-its-value-cannot/m-p/772010#M62452</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-03-21T20:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: "days_to_close" is a read only property; its value cannot be set</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/quot-days-to-close-quot-is-a-read-only-property-its-value-cannot/m-p/773075#M62539</link>
      <description>&lt;P&gt;&lt;SPAN&gt;closedate was what I was looking for, thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:37:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/quot-days-to-close-quot-is-a-read-only-property-its-value-cannot/m-p/773075#M62539</guid>
      <dc:creator>dan9</dc:creator>
      <dc:date>2023-03-23T15:37:50Z</dc:date>
    </item>
  </channel>
</rss>

