Skip to main content

Company tags: introducing filtering

· 2 min read
David Coplowe
Product Owner, Client Experience

The List companies endpoint now supports querying by tags, streamlining company management in Codat. This feature lets you retrieve companies based on specific criteria.

What's new?

You can now use the tags query parameter on the List companies endpoint to filter by one or more tags assigned to your companies. The tags query parameter supports the following operators, using Codat’s query language:

  • Equals (=)
  • Not equals (!=)
  • Contains (~)

Here is a query example that returns a specific company by a customer ID:

const result = await platformClient.companies.list({
tags:`uid=${customerId}`,
});

Who is this relevant for?

This feature is ideal for anyone looking to find companies based on their customer ID or to access a group of companies categorized by the products or services you provide.

How to get started?

  1. Enrich company records with tags using the Create company or Update company endpoints. See Add metadata to a company.
  2. Filter companies using the tags query parameter on the List companies endpoint. See Filter companies by metadata.