Hi,
When creating a custom object, I can send a single POST request to push both the associations and the properties of the new object.
I send a POST request to:
https://api.hubapi.com/crm/v3/objects/{objectType}
with the following structure:
data = {
'associations':
[{'to': {'id': TO_OBJECT_ID},
'types': [{
'associationCategory': 'USER_DEFINED',
'associationTypeId': ASSOCIATION_TYPE_ID
}]}],
'properties': {...}
}
The object is created successfully with the correct properties and associations.
When trying to update the object (both properties and associations), I use a similar POST request to the endpoint:
https://api.hubapi.com/crm/v3/objects/{objectType}/{objectId}
with the same data structure:
data = {
'associations':
[{'to': {'id': TO_OBJECT_ID},
'types': [{
'associationCategory': 'USER_DEFINED',
'associationTypeId': ASSOCIATION_TYPE_ID
}]}],
'properties': {...}
}
However, even though I receive a Response [200], only the properties are updated.
Do you know if updating properties and associations within the same request is supported?
The associations between objects change over time, and I would like to update them within a single API request.
Thank you.
