Is there any api to get contacts linked to a company?

I can’t figure out how I can find a list of all contacts that are connected/linked to a company via the API.

Is that possible?

Using the xmlrpc you can read the ‘Company’ table (view) which has an assigned ‘owner contact’ to it. If you’re looking for a list of all those who have the same company then that would have to be done by the company. You would query all contact on the contact table with a specific company assigned…so in that case you’d query to company table once for a list of all company records and then iterate through that list with a query for all contacts with that company set on their contact record…

Thanks John for your reply is there any REST API using which I can retrieve contacts linked to company instead of xmlrpc…

The approach looks like a workaround. If there are many companies and contacts, it would be a time-consuming approach to iterate through the records.

You’re correct, it is indeed a work around. If there were a more direct way that I was aware of (xmlrpc or rest) I’d definitely had recommended it, but I’m afraid I’ve not seen any for what you specifically want.

They’ve improved a number of things with some rest calls (like getting a list of contacts with a specific tag) but not contacts by company.