SolidX

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:

OperatorDescription
$eqEqual
$eqiEqual (case-insensitive)
$neNot equal
$neiNot equal (case-insensitive)
$ltLess than
$lteLess than or equal to
$gtGreater than
$gteGreater than or equal to
$inIncluded in an array
$notInNot included in an array
$containsContains
$notContainsDoes not contain
$containsiContains (case-insensitive)
$notContainsiDoes not contain (case-insensitive)
$nullIs null
$notNullIs not null
$betweenIs between
$startsWithStarts with
$startsWithiStarts with (case-insensitive)
$endsWithEnds with
$endsWithiEnds with (case-insensitive)
$orJoins the filters in an "or" expression
$andJoins the filters in an "and" expression
$notJoins 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 $not operators can be nested inside one another for complex logic.

Example filters

Simple examples

  1. Equal match: Get all active users

    filters: { status: { $eq: 'active' } }
    // → ?filters[status][$eq]=active
  2. 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

  1. Using $and: Get users aged > 25 AND status = active

    filters: {
      $and: [
        { age: { $gt: 25 } },
        { status: { $eq: 'active' } }
      ]
    }
    // → ?filters[$and][0][age][$gt]=25&filters[$and][1][status][$eq]=active
  2. 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