Skip to main content

FilterRange

An inclusive range constraint for a search filter. Valid only for filters declared with type date or number in /capabilities. At least one bound is required. A filter value may be a single range or a non-empty array of ranges; an array is matched as an OR of its ranges — an entity matches when any of the ranges matches.

A bound's JSON type MUST match the declared type of the filter it is applied to — a string for a date filter, a number for a number filter. A mismatched bound MUST be rejected with a 400 ValidationError.

A date bound is either a calendar date (YYYY-MM-DD) or a full RFC 3339 date-time; any other form, including a partial date such as 2020 or 2020-12, MUST be rejected with a 400 ValidationError. A calendar date covers the whole of its day in UTC: gte resolves to 00:00:00Z on that date, and lte covers every instant strictly before 00:00:00Z of the following date — at millisecond precision, 23:59:59.999Z on that date. A date-time is used exactly as given; one carrying no timezone offset is interpreted as UTC. A whole calendar year is therefore gte 2020-01-01 with lte 2020-12-31.

The same resolution governs a date filter's exact values: "2020-12-31" matches any instant within that UTC day, while "2020-12-31T10:00:00Z" matches that instant alone.

gte object

The inclusive lower bound.

oneOf
string
lte object

The inclusive upper bound.

oneOf
string
FilterRange
{
"gte": "2020-01-01",
"lte": "2020-12-31"
}