API3
frankebailey at June 19th, 2018 05:26 — #1
Is it possible to search companies by a tag? I have customers, and I have suppliers, and they are tagged as such. There are usually a company named, eg., Ajax Finance, that's tagged as a CUSTOMER, and another company named Ajax Finance Ltd, that's a SUPPLIER. If I do a name search via the API, both companies are returned, and the only way to know which one is the right one is to iterate through both results and pull out the tags and check those. Is there a way to specify a tag in the API call so that I can get only the Ajax Finance that's a supplier?
kevin at June 22nd, 2018 04:07 — #2
Hi FrankEBailey,
It is not possible to assign tags to companies or to search companies by tag.
In Onepage, the main resource is the Contact. Tags can be only be assigned to contacts. Companies are a collection of contacts.
In your case you could query the Contacts endpoint, query by tag and search for company name. e.g:
../api/v3/contacts?tag=CUSTOMER&search=Ajax Finance
Alternative you could create a Filter to do the same thing.
Thank you,
Kevin
Powered by Discourse, best viewed with JavaScript enabled