Skip to main content
GET
Get all companies

Complex Usage Example

Advanced Company Filtering with Full Context

This example demonstrates advanced filtering with multiple parameters, relationship inclusion, business entity filtering, sorting, and pagination for retrieving companies:
This comprehensive query will:
  • Include relationships: Retrieve complete data for people, workspaces, contact information, and documents
  • Filter by workspace: Limit to companies in a specific workspace
  • Search by name: Find companies with “TechCorp” in their name
  • Filter by business entity: Only show German GmbH companies
  • Registration filtering: Filter by tax ID and registration numbers
  • Geographic filtering: Limit to companies in Germany
  • Contact filtering: Find companies with specific email or phone
  • Media filtering: Only show companies with logos
  • Date range filtering: Limit to companies created/updated in specific periods
  • Sorting: Order by creation date (newest first)
  • Pagination: Get 25 results per page with cursor-based pagination
Filter and sort on a related (included) object by nesting into the relationship — the same relationships you pass to include.
  • To-one relations nest directly: { "issuer": { "name": { "_eq": "Acme" } } }, and sort by a dot-path: "orderBy": { "field": "issuer.name", "direction": "asc" }.
  • To-many relations must be quantified with _some, _every, or _none: { "items": { "_some": { "quantity": { "_gt": 1 } } } }. They are not directly sortable (a to-many sort needs an aggregate proxy).
  • Composite composite_* columns are virtual — filter and sort on their underlying source fields, not on the composite.
Workspace row-level security applies at every hop, so a related-object filter never widens your tenant scope. Full operator set, deep-nesting rules, and pagination notes: Filtering & sorting. This resource’s related objects (the ones you can include) and how to filter or sort on each: Replace field_name with any field of the related object. See its object-reference page for the full field list. Filter by a to-one relation (and sort by it):
Filter by a to-many relation (quantified — bare nesting is invalid):

Headers

Authorization
string
required

Bearer token for authentication

Query Parameters

include
enum<string>

Include detailed relationship data in the response. Comma-separated values supported.

Available options:
workspace,
company,
people,
documents,
created_by,
medias,
web_links,
emails,
phones,
categories,
locations,
people,
parents,
subsidiaries
filter[created_at_from]
string<date-time>

Filter companies created on or after this date

filter[created_at_to]
string<date-time>

Filter companies created on or before this date

filter[updated_at_from]
string<date-time>

Filter companies updated on or after this date

filter[updated_at_to]
string<date-time>

Filter companies updated on or before this date

filter[created_by]
string<uuid>[]

Filter companies by creator ID(s)

filter[workspace_id]
string<uuid>[]

Filter companies by workspace ID(s)

filter[external_workspace_id]
string[]

Filter companies by external workspace ID(s)

filter[emails]
string<email>[]

Filter companies by email address(es)

filter[phone]
string[]

Filter companies by phone number(s)

filter[parent_registration]
string[]

Filter companies by parent registration number(s)

filter[documents_id]
string<uuid>[]

Filter companies by associated document ID(s)

filter[parents_company_id]
string<uuid>[]

Filter companies by parent company ID(s)

filter[parents_company_tax_id_value]
string[]

Filter companies by parent company tax ID value(s)

filter[parents_company_registration_registered_value]
string[]

Filter companies by parent company registration value(s)

Filter companies by primary domain URL(s)

sort
enum<string>

Sort companies by field. Use - prefix for descending order.

Available options:
created_at,
-created_at,
updated_at,
-updated_at,
issue_date,
-issue_date,
due_date,
-due_date

Response

Companies retrieved successfully

data
object[]
meta
object