APIs & Integrations

zxdong262
Member

Is it possible to get company phone from GET /contacts/v1/lists/all/contacts/all

SOLVE

Hi hubspot,

I tried property=companyphone with GET /contacts/v1/lists/all/contacts/all with no luck, just want to confirm if it is available for the GET /contacts/v1/lists/all/contacts/all api.

Thank you.

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Is it possible to get company phone from GET /contacts/v1/lists/all/contacts/all

SOLVE

Hi @zxdong262,

Thank you for clarifying. While the company phone can be called from a contact record, the data does not live on the contact object by default unless you have created a custom companyphone property. If this is your situation, please send me a link to the companyphone property in your HubSpot account.

If you are not referring to a custom contact property, the company phone number must be pulled through the Companies API. For example:

https://api.hubapi.com/companies/v2/companies/paged?properties=companyphone

(Please note that you have to use properties for the Companies API, unlike using property for the Contacts API.)

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
3 Replies 3
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Is it possible to get company phone from GET /contacts/v1/lists/all/contacts/all

SOLVE

Hi @zxdong262,

Thank you for clarifying. While the company phone can be called from a contact record, the data does not live on the contact object by default unless you have created a custom companyphone property. If this is your situation, please send me a link to the companyphone property in your HubSpot account.

If you are not referring to a custom contact property, the company phone number must be pulled through the Companies API. For example:

https://api.hubapi.com/companies/v2/companies/paged?properties=companyphone

(Please note that you have to use properties for the Companies API, unlike using property for the Contacts API.)

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Is it possible to get company phone from GET /contacts/v1/lists/all/contacts/all

SOLVE

Hi @zxdong262,

There isn't a default contact property with the internal name companyphone, but if you have a custom contact property with that name, you should be able to pull it. Can you share a link to the property in your property settings?

Isaac Takushi

Associate Certification Manager
0 Upvotes
zxdong262
Member

Is it possible to get company phone from GET /contacts/v1/lists/all/contacts/all

SOLVE

Thank you, Isaac,

I mentioned this because in contact call page, I can select company phone even I did not set company phone. I noticed there is a api to get all phone numbers (/twilio/v1/phonenumberinfo/contactPhoneNumbersByProperty), if the conacts api can provide company phone like this, it would be consistant in some cases.

0 Upvotes