Very often your database contains a large amount of entries, so it's better to apply filters when you retrieve data. Ragic API filters are in a special format
You can use the parameter "where" to add a filter condition to a query as below:
curl --get -d "where=2000123,eq,Alphabet Inc." \ -H "Authorization:Basic YOUR_API_KEY_GOES_HERE" \ -d api \ https://www.ragic.com/demo/sales/1

The parameter is a "," comma delimited format, with at least 3 arguments.
You can supply a query with multiple filter conditions as below:
curl --get -d "where=2000123,eq,Alphabet Inc." \ -d "where=2000127,eq,Jeff Kuo" \ -H "Authorization:Basic YOUR_API_KEY_GOES_HERE" \ -d api \ https://www.ragic.com/demo/sales/1

Here's the list of operands that you can use:
| Operand Name | Operand Value |
|---|---|
| Equals | eq |
| Regular Expression | regex |
| Greater or equals | gte |
| Less or equals | lte |
| Greater | gt |
| Less | lt |
| Contains | like |
| Equals a node id | eqeq |
Please note that:
1. When you filter by date or date time, they will need to be in the following format: yyyy/MM/dd or yyyy/MM/dd HH:mm:ss.
2. You don't need to fill the third argument if you want to filter empty values, for example, "where=2000127,eq," .
3. When multiple "eq", "regex", or "like" conditions are applied to the same field, the filter will be treated as an OR condition. For example, to retrieve records where field id 1000001 is either Ratshotel OR Claflin, "where=1000001,eq,Ratshotel&where=1000001,eq,Claflin" .
4. When both gte/gt and lte/lt conditions are applied to the same field, the filter will be treated as an AND condition (applicable to Number Fields or Date Fields for specifying a range). For example, to retrieve records where field id 105 falls between 2025/10/01 AND 2025/10/31, "where=105,gte,2025/10/01&where=105,lte,2025/10/31" .
There are some system fields that has special field ids that you can use in your query. Common system fields listed below:
| System field name | Field id |
|---|---|
| Create Date | 105 |
| Entry Manager | 106 |
| Create User | 108 |
| Last Update Date | 109 |
| Notify User | 110 |
| If Locked | 111 |
| If Starred | 112 |
You can also use a full text search as a query filter. Just provide your query term in the parameter fts and the matched result will be returned.
curl --get -d "fts=Alphabet" \ -H "Authorization:Basic YOUR_API_KEY_GOES_HERE" \ -d api \ https://www.ragic.com/demo/sales/1

You can also apply Shared View. Just set the id as below.
curl --get -d "filterId=YOUR_SHARED_VIEW_ID" \ -H "Authorization:Basic YOUR_API_KEY_GOES_HERE" \ -d api \ https://www.ragic.com/demo/sales/1

You could get the id by clicking the Shared View URL.
