diff --git a/docs/api.md b/docs/api.md index 91e8492ed..8a440545f 100644 --- a/docs/api.md +++ b/docs/api.md @@ -162,6 +162,17 @@ including `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), and `range`. Lastly, document link fields support a `contains` operator that behaves like a "is superset of" check. +Date fields also accept relative expressions supported by +[dateparser](https://dateparser.readthedocs.io/en/stable/), such as `today`, +`in 30 days`, or `1 month ago`. For example, dates within the next 30 days: + +```json +["expiry", "range", ["today", "in 30 days"]] +``` + +Expressions resolve each time the query runs, using `PAPERLESS_TIME_ZONE` and +`PAPERLESS_DATE_PARSER_LANGUAGES` (automatic language detection when unset). + ### `/api/search/autocomplete/` Get auto completions for a partial search term.