OR and AND operators in API queries
Last updated
Was this helpful?
Last updated
Was this helpful?
Is possible to use both OR and AND operators in API queries. The two new operators syntax are:
(OR)
(AND)
Set of filters can be separated by OR and AND operators, the filters within a single set of filter will be put in AND.
Some examples:
Cargo?filter=charterer.businessPartnerType.businessPartnerType(EQ)&&filter=weight(GT)400000
CargoPort?filter=cargo.charterer.key(EQ)1001845&filter=cargo.voyage.voyageStatus(EQ)%20&filter=port.portName(IN)(OSLO)&filter=reasonForCall.reasonForCall(EQ)L&filter=(OR)&filter=cargo.voyage.voyageStatus(EQ)%20&filter=port.portName(IN)(GAETA)&filter=reasonForCall.reasonForCall(EQ)D&filter=(OR)&filter=reasonForCall.reasonForCall(EQ)E
Limitations:
It is not possible use calculated fields with AND and/or OR.
Parenthesis are not supported