Retrieve Endpoint
Information about the retrieve endpoint of the REST API, including usage, parameters, and responses
This section will give information about the retrieve endpoint of the REST API, including how to use it, what parameters it accepts, and what responses it returns.
The retrieve endpoints allows you to fetch one or more records from the system.
Read API: Query string (filters) usage
Queries can accept a filters parameter with the following syntax:
Each filter is expressed as filters[field][operator]=value.
The following operators are available:
| Operator | Description |
|---|---|
| $eq | Equal |
| $eqi | Equal (case-insensitive) |
| $ne | Not equal |
| $nei | Not equal (case-insensitive) |
| $lt | Less than |
| $lte | Less than or equal to |
| $gt | Greater than |
| $gte | Greater than or equal to |
| $in | Included in an array |
| $notIn | Not included in an array |
| $contains | Contains |
| $notContains | Does not contain |
| $containsi | Contains (case-insensitive) |
| $notContainsi | Does not contain (case-insensitive) |
| $null | Is null |
| $notNull | Is not null |
| $between | Is between |
| $startsWith | Starts with |
| $startsWithi | Starts with (case-insensitive) |
| $endsWith | Ends with |
| $endsWithi | Ends with (case-insensitive) |
| $or | Joins the filters in an "or" expression |
| $and | Joins the filters in an "and" expression |
| $not | Joins the filters in a "not" expression |
When several fields are passed in the filters object, they are implicitly combined with $and.
For example:
GET /api/fees?filters[amount][$gte]=5000&filters[status][$eq]=paid
This query returns all fee records where the amount is at least ₹5000 and the status is “paid” — for instance, to fetch all high-value paid fee transactions.
💡 Tip:
$and,$or, and$notoperators can be nested inside one another for complex logic.
Example filters
Simple examples
-
Equal match: Get all active users
filters: { status: { $eq: 'active' } } // → ?filters[status][$eq]=active -
Greater than and contains: Get users with age > 25 and name containing "John"
filters: { age: { $gt: 25 }, name: { $containsi: 'john' } } // → ?filters[age][$gt]=25&filters[name][$containsi]=john
Nested examples
-
Using
$and: Get users aged > 25 AND status = activefilters: { $and: [ { age: { $gt: 25 } }, { status: { $eq: 'active' } } ] } // → ?filters[$and][0][age][$gt]=25&filters[$and][1][status][$eq]=active -
Using
$or: Get users whose name starts with "A" OR have role "admin"filters: { $or: [ { name: { $startsWithi: 'a' } }, { role: { $eq: 'admin' } } ] } // → ?filters[$or][0][name][$startsWithi]=a&filters[$or][1][role][$eq]=admin