APIs & Integrations

AJLaPorte
HubSpot Product Team
HubSpot Product Team

New Functionality: PATCH Method for updating CRM Object Properties

What’s happening?

We are adding the availability of a PATCH Method for use when updating the CRM Object Properties. This will allow for updating ONLY the fields that are included with the PATCH request. Any omitted fields will not be updated and will retain their current value.

 

For example, the following request would only update the description of the property, without affecting the other property settings, such as the property group, or the options for enumerated properties:

 

$ curl https://api.hubapi.com/properties/v2/tickets/properties/named/example_property?hapikey=$YOUR_HAPIKEY \
  --request PATCH \
  --header "Content-Type: application/json" \
  --data '{ "description": "My updated description" }'

 

Why is this happening?

Previously when updating a CRM Object Property, the only method available was the PUT method. While this worked, if all of the properties were not sent in the request and some fields were omitted, such as the label and description properties, these would then be reset to a null (blank) value or a value of ‘false’ for boolean values (even if the value was true prior to the PUT).

 

When is this happening?

This method is currently available and can be viewed here: https://developers.hubspot.com/docs/methods/crm-properties/update-property

To view the PUT method for updating, please visit: https://developers.hubspot.com/docs/methods/crm-properties/update-property-put

2 Replies 2
wreid
Member

New Functionality: PATCH Method for updating CRM Object Properties

Does this handle patching of custom properties too?

0 Upvotes
AJLaPorte
HubSpot Product Team
HubSpot Product Team

New Functionality: PATCH Method for updating CRM Object Properties

Hi @wreid,

 

Yes, this also encompasses the patching of custom properties as well.

 

-AJ

0 Upvotes