Filter Master Record/Custom Module Records
The filter
query parameter allows you to retrieve specific records by applying conditional expressions on fields. It supports filtering on numeric, string, date, and primitive fields using various operators. The filter supports AND and OR logical operators to create complex queries.
When filtering on DATE
fields, you must pass the localTimeZone
query parameter.
Without this, the system may not return the correct records because of timezone differences in date comparison. localTimeZone
must be in IANA timezone format (Example: America/Los_Angeles
)
API Example for Master Record
API Example for Module Record
Filter Syntax
fieldName
: Field to filter on.fieldType
: Supported field types:NUMBER
,STRING
,DATE
PRIMITIVE
operator
: Comparison operator (explained below).value
: Value to compare against.
Combining Conditions with:
AND
OR
Translates to: (number1 = 6 AND number2 = 1) OR (contact = 1234)
Supported Operators and Examples
NUMBER
eq
Equals
number_field:eq:1234
NUMBER
ne
Not Equals
number_field:ne:4
NUMBER
ge
Greater than or equal
number_field:ge:2
NUMBER
gt
Greater than
number_field:gt:2
NUMBER
le
Less than or equal
number_field:le:2
NUMBER
lt
Less than
number_field:lt:2
NUMBER
eq:null
Field is blank
number_field:eq:null
NUMBER
ne:null
Field is not blank
number_field:ne:null
STRING
eq
Equals
email_id:eq:abc@xyz.com
STRING
cn
Contains
email_id:cn:m
STRING
sw
Starts With
email_id:sw:d
STRING
ew
Ends With
email_id:ew:m
STRING
nc
Does Not Contain
email_id:nc:com
STRING
eq:null
Field is blank
email_id:eq:null
STRING
ne:null
Field is not blank
email_id:ne:null
PRIMITIVE
ne
Not Equals
addition:ne:0
DATE
eq
Equals (format: yyyy-MM-dd)
createdDate:eq:2024-03-22 &localTimeZone=America/Los_Angeles
DATE
ne
Not Equals
createdDate:ne:2024-03-22&localTimeZone=America/Los_Angeles
DATE
gt
After Date
createdDate:gt:2024-01-01&localTimeZone=America/Los_Angeles
DATE
lt
Before Date
createdDate:lt:2024-03-01&localTimeZone=America/Los_Angeles
DATE
ge
On or After Date
createdDate:ge:2024-02-01&localTimeZone=America/Los_Angeles
DATE
le
On or Before Date
createdDate:le:2024-03-31&localTimeZone=America/Los_Angeles
Combining AND and OR Conditions
AND
and
number_field_1:eq:6:and:number_field_2:eq:1
Both conditions must be true
OR
or
number_field_1:eq:6:or:number_field_2:eq:1
Either conditions can be true
Examples of Filter Usage
Example 1 - AND
Condition
AND
ConditionRecords where number_field_1 = 6
AND number_field_2 = 1
Example 2 - OR
Condition
OR
ConditionRecords where number_field_1 = 2124
OR contact = 896543
Example 3 - in
Operator (Multiple Values)
in
Operator (Multiple Values)Records where number_field_1
is 2, 10, or 15
Example 4 - Date Comparison
Records created between March 1, 2024, and March 31, 2024
Example 5 - Null and Not Null Checks
Records where number_field_1
is blank
Records where email_id
is not blank
Important Notes
filter
is optional but powerful for targeted queriesUse the correct fieldType as per your data model
in:
operator values must be separated by|
(pipe symbol)Date format must be YYYY-MM-DD
Supports up to 1,000 records per request
Common Use Cases
Get approved records
status:eq:Approved
Filter by serial number
serial_number:eq:1234
Filter by multiple number values
number_field_1:in:2
Filter by date range
createdDate:ge:2024-03-01:and:createdDate:le:2024-03-31
Check for blank number
number_field_1:eq:null
Match text containing a string
email_id:cn:m
Multiple conditions with AND/OR
number_field_1:eq:10:and:number_field_2:eq:20
number_field_1:eq:10:or:number_field_2:eq:20
Summary
The filter
parameter provides a flexible querying mechanism with:
Support for AND and OR conditions
Numeric, String, Primitive, and Date field filtering
Range filtering, null checks, and list matching (
in
)Easy filtering by date ranges for audit or time-based queries
Last updated
Was this helpful?