APIs & Integrations

odavid0
Mitglied

Company list update api property

Hey

 I have a list of companies

is there any option to get with API:

1- get a list of companies for specific companies list?

2- update company record (prop) value for each company?

Thanks

0 Upvotes
7 Antworten
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Company list update api property

@odavid0 

1.  Getting companies by list is not yet available.  Was also asked here

2.  You can use the batch update endpoint to update properties for a group of companies

0 Upvotes
odavid0
Mitglied

Company list update api property

Hey

Thank you for the answer.

So it's not an option to update the custom field for a single company?

I found that it's ok to update the custom field for contact but not for company.

 

Thanks

omer

0 Upvotes
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Company list update api property

@odavid0 ,

Sure you can patch a company record using the Companies Object endpoint

/crm/v3/objects/companies/{companyId}

Send a json payload with the properties you want to update.

EG:

{
  "properties": {
    "city": "Cambridge",
    "domain": "biglytics.net",
    "industry": "Technology",
    "name": "Biglytics",
    "phone": "(877) 929-0687",
    "state": "Massachusetts"
  }
}

 

0 Upvotes
odavid0
Mitglied

Company list update api property

Wow, thank you! 

and can I get a list of companies by list id?

0 Upvotes
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Company list update api property

Presently, you cannot get companies by list id.  If you have a property that is always the same that could identify these companies, you could use the search endpoint and filter by that property

0 Upvotes
odavid0
Mitglied

Company list update api property

Hey

thank you for the answer

can you please send an example of GET API by exact property value

for example, i want all companies with prop isNew = TRUE

 

thanks! 

0 Upvotes
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Company list update api property

@odavid0 

You would use the POST method with a JSON body with this as a minimum:

{
    "filters": [
        {
            "propertyName": "isNew",
            "operator": "EQ",
            "value": "TRUE"
        }
    ]
}

If you want to add more properties retured than the default, you will need to request them explicitly

0 Upvotes