Can't populate business/industry field on list api
SOLVE
Hi, I am currently populating name and email by using the hubspot api. I would also like to update the business industry field. I have added the name "business_industry" to my API call, is there another name or method I should use to populate this field when adding to a list? I have attempted to update a list with this field but it does not add the entry.
Can't populate business/industry field on list api
SOLVE
@joeinsurancethought, I appreciate your patience while I was out of office over the Thanksgiving holiday.
In HubSpot, lists are simply collections of contact records. Lists do not have their own properties; rather, they make it easier to view and act on the property values of the contacts they contain. If you're looking at a list and "see" a field for the business_industry property, what you're actually looking at is just a column label. The values in this column reflect each contact's value for that property. You cannot add column labels to lists via any API — each user must add them via this method.
While a column for a property like business_industry may not appear the first time a user looks at a list, it doesn't affect the list's functionality. The list still contains the contacts which were either manually (static list) or automatically (active list) added and all of the contacts will either have a business_industry property value or they won't. Any user can surface the values contacts have by clicking Actions > Edit columns and checking the box for the business_industry property.
Now, if you're asking how to get the business_industry property values onto contact records so that you can then view them in a list, you would use this Contacts API endpoint.
Again, this would "populate" the business_industry value for a contact, but it might not appear as a list column unless you go through these steps.
Can't populate business/industry field on list api
SOLVE
@joeinsurancethought, I appreciate your patience while I was out of office over the Thanksgiving holiday.
In HubSpot, lists are simply collections of contact records. Lists do not have their own properties; rather, they make it easier to view and act on the property values of the contacts they contain. If you're looking at a list and "see" a field for the business_industry property, what you're actually looking at is just a column label. The values in this column reflect each contact's value for that property. You cannot add column labels to lists via any API — each user must add them via this method.
While a column for a property like business_industry may not appear the first time a user looks at a list, it doesn't affect the list's functionality. The list still contains the contacts which were either manually (static list) or automatically (active list) added and all of the contacts will either have a business_industry property value or they won't. Any user can surface the values contacts have by clicking Actions > Edit columns and checking the box for the business_industry property.
Now, if you're asking how to get the business_industry property values onto contact records so that you can then view them in a list, you would use this Contacts API endpoint.
Again, this would "populate" the business_industry value for a contact, but it might not appear as a list column unless you go through these steps.
I'm still uncertain of your goal. To restate my question from yesterday, are you trying to set the contacts' business_industry property values or modify a lists filters or visible columns?
If you are calling https://api.hubapi.com/contacts/v1/lists/{listid}/add, then you must be trying to add a contact to a static list. This has nothing to do with their business_industry property value, however.
Can't populate business/industry field on list api
SOLVE
Hi @Isaac_Takushi, my goal is to have the business_industry field populated by whatever means it takes in hubspot. I don't know my way around the hubpsot so forgive me if I don't know the exact route to do that.
AFAIK api_hubapi_com/contacts/v1/lists/{listid}/add adds a contact to a static list. I do see the field business_industry in the list with id 415 so I'm not sure why you say it has nothing to do with it.
I first add the contact to the contacts in general with this:
api_hubapi_com/contacts/v1/contact/
The payload you're sending looks like what you would send to this Contacts API endpoint to create a contact. Once you create the contact, you can use either the vid or email value to add them to a list.
//then I add to a specific list
url = f'https://api.hubapi.com/contacts/v1/lists/{listid}/add?hapikey={hapikey}'
tmp = json.loads('''{"vids": }''')
tmp['vids'] = vids
headers = {'Content-type': 'application/json'}
r = requests.post(url, data=json.dumps(tmp),headers=headers,timeout=timeout)
Given the payload above, is there anything that would stop the business_industry from being populated?
To clarify, are you trying to update the business_industry property values of contacts with a Contacts API endpoint like this or modify a contact list's filters using a Contact Lists API endpoint like this?
Either way, could you share the exact request URL you are using, the payload you are sending, and the response code and message you receive? (Please remove any authenticating information like API keys.)