Skip to main content

Listing & filters

List endpoints in API v2 share the same query model used in the Heffl app. This applies to GET /contacts, GET /companies, GET /deals, GET /quotations, GET /leads, and GET /tasks.
Pass filters as a JSON-encoded string in the query (use curl -G with --data-urlencode). Example: filters={"status":{"operator":"is","values":["ACTIVE"]}}. Do not rely on nested query-object encoding — JSON in one query parameter is the supported approach for agents and integrations.

Query parameters

API v2 list endpoints use pageSize, not limit. Legacy v1 endpoints still use limit.

Basic list

Sorting

Structured filters

Each filter field accepts an object with operator and values:
Pass filters as a JSON-encoded query parameter:

Available contact and company filters

Option and tag filters take string IDs — the same prefixed IDs returned by the API (for example cs_abc123, usr_xyz789, tag_def456). Date filters take ISO 8601 strings. GET /contacts always returns contacts only and GET /companies always returns companies only — you do not need to pass a type filter. Both support search on name, number, email, and phone, and orderBy of createdAt, name, or number.

Available deal filters

Deals support search on title, number, and client name, and orderBy of createdAt, position, expectedCloseDate, or price. Client IDs use the clt_ prefix; pipeline and stage IDs use dpl_ and dps_; product filters use prd_. See ID prefixes.

Available lead filters

Leads support search on name, title, mobile, email, secondary mobile, and website, and orderBy of createdAt, position, name, or value. Stage IDs use the lstg_ prefix; assignee and owner filters use usr_; tags use tag_.

Available task filters

Tasks support search on title, number, and description, and orderBy of createdAt, dueDate, startDate, number, or title. Assignee and tag filters use usr_ and tag_ prefixes.

Available quotation filters

Quotations support search on number, subject, client name, and line item text. orderBy accepts createdAt, date, number, or expiryDate. Client IDs use clt_; deal IDs use dl_; template IDs use tpl_; product filters use prd_. See ID prefixes.

Filter examples

Owner is a specific user:
Contacts tagged with any of several tags:
Created in a date range:

Permissions

List results respect the API key user’s permissions:
  • Contacts and companies — If the user cannot view records owned by others, results are limited to records they own.
  • Deals — If the user cannot view deals owned by others, results include only deals they own or are assigned to.
  • Leads — If the user cannot view leads owned by others, results include only leads they own or are assigned to.
  • Tasks — If the user cannot view tasks assigned to others, results include only tasks they created or are assigned to.
  • Quotations — If the user cannot view quotations owned by others, results include only quotations where they are the sales person (or salesPersonId is unset).

Response

Fetch the next page with the cursor: