Actually we are below two apis to create deals with associated contact and getting deals based on the contact.
API:
URL: https://api.hubapi.com/crm/v3/objects/deals
Body:
{
"properties":{
“amount”: “1500.00”,
“dealname”: “Custom data integrations24”,
“pipeline”: “default”,
“closedate”: “2025-12-07T16:50:06.678Z”,
“dealstage”: “qualifiedtobuy”
},
“associations”: [
{
"to": {
"id": 51
},
"types": \[
{
"associationCategory": "HUBSPOT\_DEFINED",
"associationTypeId": 3
} ]
}]
}
Here i am creating one deal for the user id 51.
API 2: In this api i an getting all deals associated with the contact id 51.
URL: https://api.hubapi.com/crm/v3/objects/deals/search
Body:
{
“properties”: [ “dealname”, “hubspot_owner_id”, “hs_exchange_rate” ],
“filterGroups”:[{
"filters":\[
{
"propertyName": "associations.contact",
"operator": "IN",
"values": \["51"]
}]
}]
}
Problem: Here what my problem is when i quickly call this api after the first create api execution completed, that time i am not receiving the last created deals. Actual problem is deal creating quickly but it taking 3 to 5 seconds to associate with the respective contact. There is a dealy in deal create api to associate with the contact so when i quickly call second api that time results are not having the last saved deal.
Not only for deal, for company creation also the same issue.
So please can you check this and provide any solution for this.