JSONAPI filter by date range

3.1k views Asked by At

GET api how to send the filter parameter if the filter is a date range

eg :

GET /products?filter[created][ge]=2018-01-01&filter[created][le]=2017-01-01
1

There are 1 answers

0
pablorsk On BEST ANSWER

JSON:API specification is agnostic about filter strategy. But, the next way is implemented on various libraries (like ngx-jsonapi or neomerx json-api):

GET /products?filter[created][since]=2018-01-01&filter[created][until]=2020-01-01