APIs & Integrations

RGorkunenko
Member

Api for non-marketing contact

Hello. Can you tell me if a contact is set as a Non-marketing contact, the contact data (name, company, etc.) cannot be retrieved via the API. However, if the contact is a Marketing contact, I can retrieve the data by ID without issues. What could this be related to? Are there any restrictions for Non-marketing contacts?

3 Replies 3
GRajput
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Api for non-marketing contact

Hi @RGorkunenko 

 

you can retrieve the contact details using the hubspot_id, I am able to search both the marketing and non-marketing contacts using this
here is the curl

 

curl --request GET \
  --url 'https://api.hubapi.com/crm/v3/objects/contacts/hubspot_id?archived=false' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

 

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


0 Upvotes
RGorkunenko
Member

Api for non-marketing contact

Thanks. I’m doing the same, but using hubspot-api-php https://github.com/HubSpot/hubspot-api-php/blob/6659a2f85b5d2a01c890a5e5ce840c09e220c5e3/codegen/Crm...
and passing archived = false. Marketing contacts are retrieved, but Non-marketing contacts are not.

GRajput
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Api for non-marketing contact

Hi @RGorkunenko 
Use the API provided by HubSpot instead of using the GitHub one. 

I tried getting the details of non-marketing contact and got all the details using the API provided above. 




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


0 Upvotes