APIs & Integrations

DBilbija
Membro

Creating a new company via API works fine, but initial return company name is empty

resolver

Hi all

 

I've been seeing this problem fairly regularly when creating new companies via API. I add the domain name (and HS fills in the rest upon creation)... that works fine, but the company object returned from the POST usually doesn't have any of the HS-filled properties filled in (e.g., Name). I have to re-query to get them. BTW, the new company ID comes back every time as expected.

 

Am I missing something, or is this by design?

 

Dushan

0 Avaliação positiva
1 Solução aceita
MichaelC
Solução
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Creating a new company via API works fine, but initial return company name is empty

resolver

@DBilbija @TiphaineCuisset 

According to the API Documentation here: https://developers.hubspot.com/docs/api/crm/companies

Endpoint create. 

The result should return some basic properties like: name, phone, state et cetera. BUT - you will only get back properties for properties you actually added in your post.

Since you only post the URL (domain name) the company actually does not have a name when you created it - it only has an ID and an URL. 

 

Once the company is created (and you already got your first response) hubspot may add company information based on the URL. But this step does not happend upon creation. It happens a millisecond after you created the company and got your first response. 

 

So - to shortly answer your question: Yes, you are correct. You have to make a second GET request with the ID to get the company data.

 

 

YouHubspotData from third pary (where HS get data through url). It might also be located within hubspots own database. 
1. Creating company > (request)  
 < 2. Company Created (response) 
 3. Request company data > (request) 
  < 4. Company name and data (response)
   
What you want to have:  
1. Creating company --> (request)  
 2. Creating company  
 3. Request company data by URL > (request) 
  < 4. Company name and data (response)
 < 5. Company Created (response) with data.  

 

I would say that its very unlikely to get what you want in this case. You simply have to make a second call and hope that hubspot has completed step 3 and 4 in time. 

 

 



Need further help with integrations or business development?



Want to help me?

Go to the following links and read through the ideas. If you like them - give the idea an upvote

Upvote the following ideas:

Exibir solução no post original

0 Avaliação positiva
3 Respostas 3
DBilbija
Membro

Creating a new company via API works fine, but initial return company name is empty

resolver

Ok, cool. Odd that there isn't a 202 response, which can then let the requestor know it's in process.  I don't send the name (and other fields) since that would imply to HS that I want my name to be whatever I send (even if blank). 

 

Easy enough tho... simple re-query will do the trick.

 

Thx, Michael!

0 Avaliação positiva
MichaelC
Solução
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Creating a new company via API works fine, but initial return company name is empty

resolver

@DBilbija @TiphaineCuisset 

According to the API Documentation here: https://developers.hubspot.com/docs/api/crm/companies

Endpoint create. 

The result should return some basic properties like: name, phone, state et cetera. BUT - you will only get back properties for properties you actually added in your post.

Since you only post the URL (domain name) the company actually does not have a name when you created it - it only has an ID and an URL. 

 

Once the company is created (and you already got your first response) hubspot may add company information based on the URL. But this step does not happend upon creation. It happens a millisecond after you created the company and got your first response. 

 

So - to shortly answer your question: Yes, you are correct. You have to make a second GET request with the ID to get the company data.

 

 

YouHubspotData from third pary (where HS get data through url). It might also be located within hubspots own database. 
1. Creating company > (request)  
 < 2. Company Created (response) 
 3. Request company data > (request) 
  < 4. Company name and data (response)
   
What you want to have:  
1. Creating company --> (request)  
 2. Creating company  
 3. Request company data by URL > (request) 
  < 4. Company name and data (response)
 < 5. Company Created (response) with data.  

 

I would say that its very unlikely to get what you want in this case. You simply have to make a second call and hope that hubspot has completed step 3 and 4 in time. 

 

 



Need further help with integrations or business development?



Want to help me?

Go to the following links and read through the ideas. If you like them - give the idea an upvote

Upvote the following ideas:

0 Avaliação positiva
TiphaineCuisset
Gerente da Comunidade
Gerente da Comunidade

Creating a new company via API works fine, but initial return company name is empty

resolver

Hi @DBilbija 

 

Thank you for reaching out.

 

I want to tag some of our experts on this @frederic_Marken @MichaelC do you have any thoughts on this for @DBilbija ?

 

Thank you!

Best

Tiphaine


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

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


0 Avaliação positiva