Skip to main content

Filtering Results

The parameter filters allows for precise and exact matching of records by evaluating specific shipment attributes against provided constraints. This is similar in concept to using a WHERE clause in an SQL query.

What are the available filters?

Each data-source has its own set of attributes which are available as filters. Review the schema down below with the chosen data-source to view the available filter attributes and their corresponding type.

Filter Types

Each available filter is representative of an underlying data-point on a shipment record. As such, each underlying data-point (and its corresponding filter, if present) has a specific data-type.

The specific data-type dictates which filter constraints may be used to evaluate the underlying data-point. Listed below are the different data-types that filters will fall under, along with the corresponding constraints that are available for that data-type.

Filter TypeSingleSetExistenceRangeGeography
String
Numeric
Date
Boolean
Geo Point

Filter Constraints

Constraint TypeDefinition
SingleThe specified record field must match this single value
SetThe specified record field must match at least one value in the provided set
ExistenceThe specified field must have any non-null value
RangeThe specified field must have a value within the provided range
GeographyThe specified field's geographical point must exist within the bounding region provided

Constraint Details and Examples

Using this single filter, only shipments that originate from the United States will be matched.

{
"data_source": "global",
"filters": {
"origin_countries": "United States"
}
}

Using Multiple Filters

By default, all filters specified as properties on the base filter object must match in order for a shipment record to be returned. However, filters may be placed into separate groups that dictate how the underlying shipment record is selected during its evaluation against the filter criteria. The available filter groups are described below.

Filter GroupDefinition
ANDAll filter criteria defined in this group must match the shipment record
NOTNone of the filter criteria defined in this group must match the shipment record
OROne of the filter groups defined in this array must match the shipment record
info

Every filter group must match in order for a record to be selected. This means that every filter in the AND group must match, every filter in the NOT group must not match, and at least one set of filters in the OR group must match, in order for a record to qualify.

Multiple Filter Example

In this example, we are searching for shipments that either have a weight greater than 20KG or an estimated value greater of $5,000, that are destined for the United States, and are being unloaded at a port which is not located on the west-coast.

{
"data_source": "global",
"filters": {
"AND": {
"destination_countries": "United States"
},
"OR": [{
"weight_kg": {
"gt": 20
}
}, {
"value_usd": {
"gt": 5000
}
}],
"NOT": {
"port_unlading_coast": "west"
}
}
}

Filter Schema

Selected Data-Source
string

Choose the desired data-source to view the available fields

Array of objects >= 2 items
object
object
string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

object or Existence (string)

This field is of type date.

object or Existence (string)

This field is of type date.

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type numeric

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

boolean or Array of booleans or Existence (string)

This field is of type boolean

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

object or Existence (string)

This field is of type numeric

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

Existence (string) or Geo Distance (object) or Geo Distance (object) or (Geo Shape (Point (object) or Multi Point (object) or Polygon (object) or Multi Polygon (object) or Envelope (object)))

This field is of type geography

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type date.

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

Existence (string) or Geo Distance (object) or Geo Distance (object) or (Geo Shape (Point (object) or Multi Point (object) or Polygon (object) or Multi Polygon (object) or Envelope (object)))

This field is of type geography

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type numeric

object or Existence (string)

This field is of type date.

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string

string or Array of strings or Existence (string)

This field is of type string