Origami Advanced Filtering Syntax
Overview
Many Origami API endpoints accept a filter query parameter that limits the response to records matching the specified criteria. The filter uses a colon-delimited expression syntax and supports logical operators for combining conditions.
Basic Syntax
Filters are passed as a query string parameter on GET requests using the following pattern: Field:operator:value
- Field: The column/property name on the entity that the criteria is applied to (e.g.,
Status,DateOfLoss,TotalIncurred). - Operator: The comparison operation to perform (e.g.,
eq,gt,contains). See the full list below. - Value: The value(s) to compare against. Multiple values for a single operator are comma-separated.
GET /api/{domain}/Query?filter=FieldName:operator:value
Operators
| Operator | Name | Example |
|---|---|---|
eq | Equals | Status:eq:Open |
!eq | Not Equals | Status:!eq:Closed |
lt | Less Than | TotalIncurred:lt:50000 |
gt | Greater Than | TotalIncurred:gt:10000 |
lte | Less Than or Equal | ReserveAmount:lte:100000 |
gte | Greater Than or Equal | ReserveAmount:gte:5000 |
between | Between | DateOfLoss:between:2025-01-01,2025-12-31 |
!between | Not Between | DateOfLoss:!between:2025-06-01,2025-06-30 |
contains | Contains | Claimant:contains:Smith |
!contains | Does Not Contain | Description:!contains:test |
startswith | Starts With | PolicyNumber:startswith:WC- |
!startswith | Does Not Start With | PolicyNumber:!startswith:GL- |
empty | Is Empty / Null | AdjusterUser:empty |
!empty | Is Not Empty / Not Null | AdjusterUser:!empty |
true | Is True | LawsuitFiled:true |
false | Is False | LawsuitFiled:false |
trueorempty | Is True or Null | LawsuitLikely:trueorempty |
falseorempty | Is False or Null | SubrogationPotential:falseorempty |
me | Equals Current User | AdjusterUser:me |
!me | Not Current User | AdjusterUser:!me |
outofoffice | User Out of Office | AdjusterUser:outofoffice |
any | Any (multi-value match) | Tags:any:Auto,Property |
all | All (multi-value, all must match) | Tags:all:Litigated,HighExposure |
hasrole | User Has Role | AdjusterUser:hasrole:SeniorAdjuster |
fiscal | Fiscal Period | DateOfLoss:fiscal:CurrentYear |
eqRecord | Equals Current Record Value | CustomNumber1:eqRecord |
Logical Operators
Combine multiple expressions using:
| Symbol | Meaning |
|---|---|
&& | AND |
|| | OR |
!( ) | NOT (wraps an expression) |
( ) | Grouping |
Multi-Value Equals
When using eq with multiple comma-separated values, the filter matches records equal to ANY of the listed values (implicit OR):
Status:eq:Open,Reopened
This returns records where Status is "Open" OR "Reopened".
Relative Dates
Date fields support relative offsets from today using + or - followed by a number of days:
LossDate:gt:+15 → Loss date more than 15 days from today
LossDate:lt:-30 → Loss date more than 30 days ago
Field-to-Field Comparisons
Compare one field against another field's value by wrapping the reference field in curly braces:
CustomNumber1:lt:{Policy.CustomNumber1}
Quoting Values
If a value contains special characters (commas, ampersands, colons, quotes), wrap it in double quotes. Escape inner quotes with a backslash:
Claimant:eq:"Smith, John"
Description:contains:"fire && water"
Notes:contains:"He said \"hello\""
Child and Parent Entity Filters
Filter based on related child or parent records:
| Prefix | Meaning | Example |
|---|---|---|
* | Child entity filter | *Custom.SafetyReport:contains:(Status:eq:1) |
^ | Parent entity filter | ^Policy:contains:(PolicyType:eq:WC) |
Complete Examples
Claims with total incurred over $50,000 that are still open:
TotalIncurred:gt:50000&&Status:eq:Open
Claims assigned to the current user with a loss date in 2025:
AdjusterUser:me&&DateOfLoss:between:2025-01-01,2025-12-31
Claims where claimant name contains "Smith" or starts with "Johnson":
Claimant:contains:Smith||Claimant:startswith:Johnson
Open claims with no adjuster assigned:
Status:eq:Open&&AdjusterUser:empty
Claims with a filed lawsuit that are NOT in litigation status:
LawsuitFiled:true&&Status:!eq:Litigation
Claims with a loss date in the current fiscal year and reserve above $10,000:
DateOfLoss:fiscal:CurrentYear&&ReserveAmount:gte:10000
Claims excluding those with status Closed or Void:
Status:!eq:Closed,Void
Grouped logic (open claims assigned to me, OR any claim with exposure of 500k or more):
(Status:eq:Open&&AdjusterUser:me)||(TotalIncurred:gte:500000)
Updated 12 days ago