- Courses
- ItemPath API
- Section 3: Using Comparison Operators
- "Greater Than" & "Less Than" Operators: [gt] & [lt]
"Greater Than" & "Less Than" Operators: [gt] & [lt]
In this example, we want to get a list of materials with a current quantity of at least 1. We can use the [gt] operator for arguments like this.
/materials?currentQuantity=[gt]0
We can do something similar with the [lt] operator. In this case, we want to get materials that are about to be over-picked and cause a shortage. We can narrow down our results by specifying a net quantity of below 0.
/materials?netQuantity=[lt]0
These can also be combined with other operators for more complex results. For example, we can get orders that are not yet in process (Order Status 11) but have a high priority (Priority 3 or 4).
/orders?priority=[gt]2&orderStatusType=[lt]11&creationDate=[gt]lastWeek