Date Range

This feature searches and matches all the indexed documents based on the date range passed in the API request.

The dateRange is an optional parameter (query) that can be passed in the API request of Simple Search, Boolean Search, Free Text Search, Match, Match with ID, Match with Multiple Sub-User Ids, and Index Count. See the below sample dateRange parameter that can be added in all the above API requests to get the response (matches) based on the documents that are indexed on the date range mentioned in the dateRange parameter.
"dateRange": [
        {
            "from": "2023-04-14",
            "to": "2023-04-18"
        }
    ],
Note:
  1. To search or match the document for a specific day, you must pass the same specific date in the “from” and “to” element of the dateRange parameter. See below example:
    "dateRange": [
            {
                "from": "2023-04-14",
                "to": "2023-04-14"
            }
        ],
    
  2. If only “from” element is mentioned in the dateRange parameter, then all the response (matches) are based on the documents that are indexed on or after the date mentioned in the “from” element. See below example:
    "dateRange": [
            {
                "from": "2023-04-14"
            }
        ]
    

API request Parameters

Request parameters for dateRange are described below:
Name Type Description Remarks
from String "from" refers to the starting date of the date range Required
to String "to" refers to the end date of the date range Optional

Error Code

Error Code Error Message
2116 Invalid date format. Date format should be in 'yyyy-MM-dd'