No updates when using the batch contact update or create endpoint
Hi,
We’re trying to switch from the individual contact updates to batch updates to bring down the number of requests that we’re sending to Hubspot each day. When we hit the batch endpoint, we are either getting a 200 or a 202 response, but we never see any updates come through.
Does anyone have any insights as to what may be happening?
No updates when using the batch contact update or create endpoint
@Jason_Connor - Two common things I’ve noticed here that could be an issue:
Check your content-type header. This endpoint requires content-type:application/json
It looks like the example JSON is using single quotes instead of double quotes. I would recommend swapping to the proper JSON syntax that uses double quotes.
No updates when using the batch contact update or create endpoint
Hi Robert,
Thanks for the reply. I’m using a libraries (python json, requests) to do both the JSON encoding and the content header. I’ll double check both, but haven’t had an issue with these in the past.
No updates when using the batch contact update or create endpoint
Yea - I would explicitly set the content-type if you are not currently:
headers = {‘content-type’:‘application/json’}
r = requests.post(url,headers=headers,payload=payload)
If you are still having issues, can you leave a more full code sample (make sure to redact your HAPI key)?