When making a request, if you're dealing with a list of data or objects, you can use the following optional queries, depending on your use case:
- SORTING
To sort, you can use the following query:
filter={the field you want to sort by}&order={1 for ascending order and -1 for descending order}
{url}?filter=product_name&order=1
- PAGINATION
To enable pagination or endless scroll, you can use the following queries:
pageNo={default=1, this shows the page number to display}&limitNo={default=20, this shows the number of records to display on one page}
{url}?pageNo=2&limitNo=10
- DATE RANGE
To access data within a specific date range, you can use the following queries:
fromDate={start date, e.g. 2023-01-28}&toDate={end date, e.g. 2023-02-28}
{url}?fromDate=2023-03-21&toDate=2023-04-01
- SEARCHING
To search for a record, use the following queries:
search={search string}
The API will perform the search and return a response.
{url}?search=example