Company list update api property

odavid0
Member

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 Replies 7
dennisedson
Community Manager

@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

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
odavid0
Member

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
Community Manager

@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"
  }
}

 

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
odavid0
Member

Wow, thank you! 

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

0 Upvotes
dennisedson
Community Manager

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

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
odavid0
Member

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
Community Manager

@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

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes