Skip to content

Correct contact search date filtering and operator docs - #625

Merged
adisan19 merged 8 commits into
mainfrom
adisanarula/contacts-search-date-operator-docs
Aug 19, 2026
Merged

Correct contact search date filtering and operator docs#625
adisan19 merged 8 commits into
mainfrom
adisanarula/contacts-search-date-operator-docs

Conversation

@adisan19

Copy link
Copy Markdown
Contributor

Why?

The contact search docs describe date filtering incorrectly. They list operators that actually return a 400 error, leave out two that work, and never mention that a date value is cut down to a whole day, which makes > look like it skips a day.

How?

Rewrites the timestamp section and the operator table in every version to say which operators each field type accepts, and what day truncation does to the comparison results.

Generated with Claude Code

@adisan19
adisan19 marked this pull request as ready for review August 19, 2026 12:52
@adisan19
adisan19 requested a review from a team August 19, 2026 12:56
adisan19 and others added 6 commits August 19, 2026 14:47
The single_filter_search_request.operator enum falsely implies != is
valid for every field type, and omits >= / <= which work on
integer/float fields. Both are type-blind facts an OpenAPI enum can't
express structurally (fields are dynamic, including custom
attributes), so the enum stays a flat superset of all valid operators
and the description now states validity per field type, including the
date-field exception (=, IN, NIN, <, > only; !=, <=, >= 400).

Also corrects the SearchContacts endpoint's "Searching for Timestamp
Fields" and "Accepted Operators" prose to state the day-truncation and
>-matches-next-day rule explicitly, and to generalize the
created_at-only <=/>= admonition to all Date fields plus !=.

Applied identically across all versions (2.7-2.16, Preview/0) since
the operator/type validation is shared search infrastructure, not
gated by public API version.
Production QA on the contact search date filters showed two things the previous
wording got wrong: unsupported operators return 422, not 400, and version 2.16
places a contact's value in a day using the workspace timezone, not UTC (the UTC
anchoring is gated on a change that has not been released).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ate docs

Preview now filters standard contact timestamps on the exact second and
accepts !=, >= and <= on them, while Date custom attributes stay
whole-day and reject those three. Verified in production on 2026-08-19.
Also drops IN and NIN from the documented date operators, since they are
not usable on date fields.
The five lines rendered as one wall of text, since consecutive markdown
lines join into a single paragraph. Splits it into short paragraphs with
a bulleted operator list and a labelled example, and normalises the
wording that had drifted between versions.
tag_id takes only = and !=; IN, NIN and the string-match operators all
return invalid_operator. The shared schema description grouped it with
plain string fields, which contradicted the endpoint table.
@adisan19
adisan19 force-pushed the adisanarula/contacts-search-date-operator-docs branch from 3e567ab to 71921b5 Compare August 19, 2026 13:47
adisan19 and others added 2 commits August 19, 2026 15:03
@adisan19
adisan19 enabled auto-merge (squash) August 19, 2026 15:43
@adisan19
adisan19 merged commit 528b0f2 into main Aug 19, 2026
3 checks passed
@adisan19
adisan19 deleted the adisanarula/contacts-search-date-operator-docs branch August 19, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants