Skip to main content

Common query parameters

Most collection endpoints accept the same query object:
  • page: 1-based page number
  • limit: page size, capped at 200
  • sort: comma-separated fields, prefix with - for descending order
  • fields: comma-separated projection fields
  • search: free-text search term
  • searchIn: comma-separated fields to search with case-insensitive regex
  • filter: JSON string or querystring-like filter expression
  • populate: related fields to populate

Response metadata

List endpoints typically return:
{
  "statusCode": 200,
  "message": "Data fetched successfully.",
  "data": [],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 42,
    "pages": 3,
    "sort": "-createdAt",
    "fields": null,
    "search": null,
    "searchIn": null,
    "filter": null
  }
}

Sorting

sort=name,-createdAt
This sorts by name ascending and then createdAt descending.

Field projection

fields=name,emailAddress,createdAt
search=triangle
searchIn=name,emailAddress

Filtering

The filter parameter supports plain equality and operator suffixes:
  • status=Active
  • balance.gte=100
  • status.in=Active,Inactive
  • createdAt.between=2026-01-01|2026-12-31
  • deleted.exists=false
You can pass the filter as:
  • a JSON string
  • a querystring-like string
Example:
curl "https://api-dev.paygen.online/cards?page=1&limit=20&sort=-createdAt&filter=status=active&search=visa&searchIn=brand,type" \
  -H "x-api-key: <client_api_key>"

Population

populate accepts either:
  • owner,team
  • owner:email name;team:title
Use this only when you need related records in the same response.