OR and AND operators in API queries

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

Last updated