APIs & Integrations

KBindslev
Member

Create batch of companies - function does not work?

I'm trying to create a batch of companies in Hubspot with python. I'm following the docs here: https://developers.hubspot.com/docs/api/crm/companies under "Create a batch of companies". The docs use a function from the hubspot library callsed BatchInputSimplePublicObjectInputForCreate. That particular function does not exist as far as I can see, and I get the following error message: ImportError: cannot import name 'BatchInputSimplePublicObjectInputForCreate' from 'hubspot.crm.companies'.

 

However, I can import and use the function to update a batch of companies 

'BatchInputSimplePublicObjectBatchInput' without any problems. So I'm wondering why the create batch function does not exist and whether it will in the near future? If not, what is the easiest way then to create batches of companies with python?
2 Replies 2
Willia_m
Participant

Create batch of companies - function does not work?

Hi,

I have the same problem the Python documentation for the API seems to be out of date. BatchInputSimplePublicObjectInputForCreate does not exist anymore. Should we now use BatchInputSimplePublicObjectInput or BatchInputSimplePublicObjectBatchInput ? How do we use those modules ?

Thanks

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Create batch of companies - function does not work?

Hey, @KBindslev 👋 Thanks for posting your question. To clarify:

  • This is the endpoint you are using? Create a batch of companies POST/crm/v3/objects/companies/batch/create
  • This error occurs when you test using the Python example directly from the page? 

Thanks for the additional details. This helps the community better understand the issue + recommend specific troubleshooting steps.

 

Thank you! — Jaycee


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !