Nov 20, 2022 10:37 AM - edited Nov 21, 2022 2:05 PM
Hi,
I'm trying to associate a deal-to-contact using a basic http requests and it keeps failing with an internal error, status code 500.
curl -i -X PUT -H 'Authorization: Bearer _TOKEN_' https://api.hubapi.com/crm/v4/objects/deals/11015101525/associations/contacts/34393001
HTTP/2 500
date: Sun, 20 Nov 2022 15:34:18 GMT
content-type: application/json;charset=utf-8
content-length: 100
cf-ray: 76d23fb8ed9608bc-EZE
strict-transport-security: max-age=31536000; includeSubDomains; preload
vary: origin
cf-cache-status: DYNAMIC
access-control-allow-credentials: false
x-hubspot-correlation-id: 95b64cea-2e05-412a-9357-9c21eff3e0c8
x-hubspot-ratelimit-daily: 1000000
x-hubspot-ratelimit-daily-remaining: 974635
x-hubspot-ratelimit-interval-milliseconds: 10000
x-hubspot-ratelimit-max: 200
x-hubspot-ratelimit-remaining: 199
x-hubspot-ratelimit-secondly: 20
x-hubspot-ratelimit-secondly-remaining: 19
x-trace: 2BBB79E9686A81AB1565425B2E0867BF1E1A587DF9000000000000000000
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=Lv%2BGN6E4wSyk5%2BLb0ojKf8mjeS%2FLpY7PHOLVMhLrvFJ6Iccy2DfzpV7ykSYXwtdO4UHNay5AOsFmfmozEXOe%2F%2BMDifKlGUtVLRAlCjX5W3QtWIFYoWmYzgbRTFwQkD%2FI"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}
server: cloudflare
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
Solved! Go to Solution.
Nov 20, 2022 8:20 PM
Hey @OsvaldoJ,
What does your payload look like? In the docs, there is a small payload associated with that request.
Nov 20, 2022 8:20 PM
Hey @OsvaldoJ,
What does your payload look like? In the docs, there is a small payload associated with that request.
Nov 21, 2022 1:56 PM - edited Nov 21, 2022 1:56 PM
Ohhh...
Going through the docs, from the deals page, the endpoint for association seems to refer to v3 even tho it says v4 and there's no reference whatsoever about a payload.
https://developers.hubspot.com/docs/api/crm/deals
Trying it, if it works i'll come back and mark it as the solution.
Btw, the error should still be a 400 bad request, not a 500 internal error ...
Nov 26, 2022 10:42 AM
Nov 26, 2022 10:47 AM
Omg! Yep, same thing, documentation and hubspot nodejs library both use v3 definition (and no payload) with v4 endpoint...