APIs & Integrations

eibach-cv
Contributor

Deal to Contact Association Cryptic Error

SOLVE

Hello,

I am getting the follow response error when trying to associate a deal to a contact, but have no idea what it means.

 

{"status":"error","message":"internal error","correlationId":"7dd1bc34-c5d7-4ebf-8f70-94138904b473"}

 

 

cURL Request

 

curl --request PUT --url https://api.hubapi.com/crm/v4/objects/deals/11161473372/associations/contact/1001 --header 'authorization:
 Bearer xxx-xxx-xxxxxxxxxxx

 

 

Request Header

 

{
  "Origin": [
    "https://app.hubspot.com"
  ],
  "sec-fetch-site": [
    "cross-site"
  ],
  "User-Agent": [
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
  ],
  "CDN-Loop": [
    "cloudflare; subreqs=1"
  ],
  "Accept-Encoding": [
    "gzip"
  ],
  "CF-Connecting-IP": [
    "64.60.199.26"
  ],
  "True-Client-IP": [
    "64.60.199.26"
  ],
  "X-HubSpot-Trace": [
    "8b02137dec7c5e1111dba65d823a31db"
  ],
  "Authorization": [
    "Bearer pat-na******"
  ],
  "X-HubSpot-Correlation-Id": [
    "7dd1bc34-c5d7-4ebf-8f70-94138904b473"
  ],
  "sec-ch-ua-mobile": [
    "?0"
  ],
  "X-HS-Internal-Request": [
    "0"
  ],
  "Content-Length": [
    "0"
  ],
  "X-Real-IP": [
    "64.60.199.26"
  ],
  "sec-fetch-mode": [
    "cors"
  ],
  "cf-worker": [
    "hubapi.com"
  ],
  "CF-Ray": [
    "7727ac9500815239-IAD"
  ],
  "Accept": [
    "application/json"
  ],
  "CF-IPCountry": [
    "US"
  ],
  "X-Forwarded-Proto": [
    "https"
  ],
  "Connection": [
    "close"
  ],
  "Referer": [
    "https://app.hubspot.com/"
  ],
  "X-Request-Start": [
    "1669854206.288"
  ],
  "X-HS-Internal-User-Request": [
    "0"
  ],
  "Host": [
    "api.hubapi.com"
  ],
  "CF-Visitor": [
    "{\"scheme\":\"https\"}"
  ],
  "X-HS-User-Request": [
    "1"
  ],
  "CF-EW-Via": [
    "15"
  ],
  "X-Forwarded-Port": [
    "443"
  ],
  "X-Amzn-Trace-Id": [
    "Root=1-6387f3fe-31f8340c3ef79f376fcc43a6"
  ],
  "sec-ch-ua": [
    "\"Google Chrome\";v=\"107\", \"Chromium\";v=\"107\", \"Not=A?Brand\";v=\"24\""
  ],
  "sec-ch-ua-platform": [
    "\"Windows\""
  ],
  "X-Forwarded-For": [
    "64.60.199.26, 172.71.190.74, 64.60.199.26"
  ],
  "Accept-Language": [
    "en-US,en;q=0.9,de;q=0.8"
  ],
  "X-Scheme": [
    "https"
  ],
  "sec-fetch-dest": [
    "empty"
  ]
}

 

 

Response Header

 

{
  "X-HubSpot-RateLimit-Remaining": [
    "149"
  ],
  "X-HubSpot-RateLimit-Max": [
    "150"
  ],
  "X-HubSpot-RateLimit-Daily": [
    "500000"
  ],
  "X-HubSpot-RateLimit-Daily-Remaining": [
    "499927"
  ],
  "X-HubSpot-RateLimit-Interval-Milliseconds": [
    "10000"
  ],
  "X-HubSpot-RateLimit-Secondly": [
    "15"
  ],
  "X-HubSpot-RateLimit-Secondly-Remaining": [
    "14"
  ],
  "Content-Type": [
    "{\"type\":\"application\",\"subtype\":\"json\",\"parameters\":{\"charset\":\"UTF-8\"},\"wildcardType\":false,\"wildcardSubtype\":false}"
  ]
}

 

 

1 Accepted solution
coldrickjack
Solution
Top Contributor

Deal to Contact Association Cryptic Error

SOLVE

Hey @eibach-cv,

 

The documentation is a little misleading you also need to pass through the association type in your request. Can you try adding the below to the body of your request and ensure it's in JSON format:

 

[
  {
    "associationCategory": "HUBSPOT_DEFINED",
    "associationTypeId": 3
  }
]

 

To add to this, now with flexible associations HubSpot allows you to define your own custom association types or to use the preset system association types. More information here.

View solution in original post

0 Upvotes
1 Reply 1
coldrickjack
Solution
Top Contributor

Deal to Contact Association Cryptic Error

SOLVE

Hey @eibach-cv,

 

The documentation is a little misleading you also need to pass through the association type in your request. Can you try adding the below to the body of your request and ensure it's in JSON format:

 

[
  {
    "associationCategory": "HUBSPOT_DEFINED",
    "associationTypeId": 3
  }
]

 

To add to this, now with flexible associations HubSpot allows you to define your own custom association types or to use the preset system association types. More information here.

0 Upvotes