Parameters
Last updated
Last updated
Endpoints that returns data in paginated format, by default paginate every 15 records. You may pass a parameter to paginate custom number of records using paginate=250
in the request
Certain routes allow you to query responses more efficiently, include relationships or sort and filter data. Queries can be stacked on top of each other. You can specify multiple unique operators.
Type | Operator | Description |
---|---|---|
Relationships are objects that have some sort of associations / coherence with each other. Certain endpoints support custom relations that are loaded if specified. (See example below)
For instance, if you want to retrieve users with all their payments, you may specify it in the request with ?include=payments
, this will return all users with their respected payments. You can specify more than one relation separating them with a comma "," ?include=address,payments,emails`
Example: (Retrieve users with their payments)
Filters allow you to refine the data that you want returned. Supported filters are specified on the API endpoint under "Available Filters". Filters can be passed inside the endpoint ?filter[key]=value
Example 1: (Retrieve all subscribed users)
This request returns all users subscribed to emails
Example 2: (Retrieve subscribed & online users)
Sorting helps you sort records alphabetically or depending on the date. Sorting parameters can be specified like so: ?sort[key]=operator
The supported operators are asc
, desc
, random
Example 1: (Retrieve latest users based on when they were created)
Example 2: (Retrieve latest users with the highest balance)
Dates allow you to filter records between two dates, or commonly used dates. The commonly used dates include today, yesterday, 3days, 7days, 14days, 30days, 90days
To filter records based on dates, you can pass the following parameter ?date=30days
this will return all records created within the last 30 days. You can also pass a custom date range using ?date=01-01-2024,01-01-2025
Relationships
include=relationship
Include relation with record
Filters
filter[key]=value
Filter based on key value
Sorting
sort[key]=asc
Sort based on key value
Dates
date=Date1,Date2
Filter between two dates