/
OR and AND operators in API queries

OR and AND operators in API queries

From API 3.19.0 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=(OR)&filter=weight(GT)400000

CargoPort?filter=cargo.charterer(IN)(20006011)&filter=port.portName(IN)(OSLO)&filter=(OR)&filter=cargo.charterer(IN)(20006011)&filter=port.portName(IN)(BERGEN) 

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 

Related content

Expressions
Expressions
More like this
Filtering
Filtering
More like this
XML Transformation
XML Transformation
Read with this
Sub queries
Sub queries
More like this
Getting Started with Dataloy REST API
Getting Started with Dataloy REST API
Read with this
Left join in API queries
Left join in API queries
More like this