I'm facing an issue while creating companies in bulk using the HubSpot batch API (/crm/v3/objects/companies/batch/create). Even though I send a batch of records (e.g., 10 at a time), only a few companies are successfully created. However, the response indicates a 200 or 201 (not 207) status with "status": "COMPLETE".
Issue Details:
Using the Python HubSpot client to send batch requests.
The API response confirms successful processing, but only some records appear in HubSpot.
Example: If I send 10 companies, sometimes only 4 get created.
It's been a while since I tested this BUT one big pain I had with the BATCH API is that Hubspot will IGNORE (literally pretend I didn't send it) items in the batch if they are EXACTLY the same. I ended up adding a custom notes property that I put in extra info that would be unique to the specific item to prevent this issue.
So if you wanted to create 5 companies and used the same exact data (and later edit them in Hubspot), it would only create 1 company. But if you wanted 5 companies and changed it so that the name was Company 1, Company 2, etc, then it would create all 5. There has to be some deviation in data for Hubspot to create the item.
Seems like there is some problem in the payload you are sending, please share the payload that you are sending to create the companies so that we have a broader view of problem.
It's been a while since I tested this BUT one big pain I had with the BATCH API is that Hubspot will IGNORE (literally pretend I didn't send it) items in the batch if they are EXACTLY the same. I ended up adding a custom notes property that I put in extra info that would be unique to the specific item to prevent this issue.
So if you wanted to create 5 companies and used the same exact data (and later edit them in Hubspot), it would only create 1 company. But if you wanted 5 companies and changed it so that the name was Company 1, Company 2, etc, then it would create all 5. There has to be some deviation in data for Hubspot to create the item.