Filters

A comprehensive list of the allowed fields values you can use to filter the results of the queries on the cart resource

To filter the results of a query on the cart resource add the filter object to the request payload specifying the fields (and related attributes) you want to filter by and the operators you want to apply on each of them (see the related tables for the full list), like in the generic example below:

{
  "{{query_type}}": { ... },
  "filter": {
    "order": {
      "date_from": "...",
      "date_to": "...",
      "date_field": "...",
      "total_amount_with_taxes": {
        "gte": ...
      }

      // ...

    },
    "line_items": {
      "types": {
        "in": [
          "...",
          "..."

          // ...

        ]
      },
      "codes": {
        "in": [
          "...",
          "..."

          // ...

        ]
      },
      "options": {
        "names": {
          "in": [
            "...",
            "..."

            // ...

          ]
        },

        // ...

      }
    },
    "customer": {
      "email": {
        "not_in": [
          "...",
          "..."

          // ...

        ]
      }

      // ...

    }

    // ...

  }
}

Please find more information on how filters work here.

Filterable fields and allowed operators

Please find below the full list of the fields (and related attributes) you can filter the results of the queries on the cart resource by, and the associated allowed values and valid operators.

billing_address field

AttributeTypeValues

business

Boolean

One of:

true

false

cities

Object

One of:

"in": ["..."]

"not_in": ["..."]

country_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

geocoded

Boolean

One of:

true

false

localized

Boolean

One of:

true

false

state_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

zip_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

customer field

AttributeTypeValues

ids

Object

One of:

"in": ["..."]

"not_in": ["..."]

emails

Object

One of:

"in": ["..."]

"not_in": ["..."]

group_names

Object

One of:

"in": ["..."]

"not_in": ["..."]

line_items field

AttributeTypeValues

codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

discount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

ids

Object

One of:

"in": ["..."]

"not_in": ["..."]

item_ids

Object

One of:

"in": ["..."]

"not_in": ["..."]

types

Object

One of:

"in": ["..."]

"not_in": ["..."]

names

Object

One of:

"in": ["..."]

"not_in": ["..."]

options_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

quantity

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

tax_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

tax_rate

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

total_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

unit_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

updated_at

Object

One of:

"eq": "..."

"ne": "..."

"gt": "..."

"gte": "..."

"lt": "..."

"lte": "..."

"gt_lt": ["..."]

"gte_lte": ["..."]

"gte_lt": ["..."]

"gt_lte": ["..."]

options

Object

The line item options (see the related table for all the single option objects attributes).

Line item options field

AttributeTypeValues

ids

Object

One of:

"in": ["..."]

"not_in": ["..."]

names

Object

One of:

"in": ["..."]

"not_in": ["..."]

quantity

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

total_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

unit_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

market field

AttributeTypeValues

ids

Object

One of:

"in": ["..."]

"not_in": ["..."]

names

Object

One of:

"in": ["..."]

"not_in": ["..."]

numbers

Object

One of:

"in": [...]

"not_in": [...]

order field

AttributeTypeValues

date_from

String

e.g.: 2022-07-06T21:41:03Z No more than 365 days before date_to. Default is 30 day before the current day, beginning of day.

date_to

String

e.g.: 2022-07-06T21:41:03Z No more than 365 days after date_from. Default is the current day, end of day.

date_field

String

One of:

current_date

created_at

updated_at

Default is current_date.

discounted

Boolean

One of:

true

false

gift_card

Boolean

One of:

true

false

coupon

Boolean

One of:

true

false

options

Boolean

One of:

true

false

adjustment_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

adjustment_tax_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

adjustment_taxable_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

country_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

coupon_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

created_at

Object

One of:

"eq": "..."

"ne": "..."

"gt": "..."

"gte": "..."

"lt": "..."

"lte": "..."

"gt_lt": ["..."]

"gte_lte": ["..."]

"gte_lt": ["..."]

"gt_lte": ["..."]

currency_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

discount_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

duty_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

freight_taxable

Boolean

One of:

true

false

gift_card_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

gift_card_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

guest

Boolean

One of:

true

false

ids

Object

One of:

"in": ["..."]

"not_in": ["..."]

language_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

line_item_options_count

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

numbers

Object

One of:

"in": [...]

"not_in": [...]

payment_method_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

payment_method_tax_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

payment_method_taxable_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

references

Object

One of:

"in": ["..."]

"not_in": ["..."]

reference_origins

Object

One of:

"in": ["..."]

"not_in": ["..."]

shipments_count

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

shipping_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

shipping_taxable_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

skus_count

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

statuses

Object

One of:

"in": ["..."]

"not_in": ["..."]

subtotal_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

subtotal_tax_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

subtotal_taxable_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

tax_included

Boolean

One of:

true

false

total_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

total_amount_with_taxes

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

total_tax_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

total_taxable_amount

Object

One of:

"eq": ...

"ne": ...

"gt": ...

"gte": ...

"lt": ...

"lte": ...

"gt_lt": [...]

"gte_lte": [...]

"gte_lt": [...]

"gt_lte": [...]

updated_at

Object

One of:

"eq": "..."

"ne": "..."

"gt": "..."

"gte": "..."

"lt": "..."

"lte": "..."

"gt_lt": ["..."]

"gte_lte": ["..."]

"gte_lt": ["..."]

"gt_lte": ["..."]

current_date

Object

One of:

"eq": "..."

"ne": "..."

"gt": "..."

"gte": "..."

"lt": "..."

"lte": "..."

"gt_lt": ["..."]

"gte_lte": ["..."]

"gte_lt": ["..."]

"gt_lte": ["..."]

aggregated_details

Object

"query": "..."

payment_method field

AttributeTypeValues

ids

Object

One of:

"in": ["..."]

"not_in": ["..."]

source_types

Object

One of:

"in": ["..."]

"not_in": ["..."]

names

Object

One of:

"in": ["..."]

"not_in": ["..."]

moto

Boolean

One of:

true

false

shipping_address field

AttributeTypeValues

business

Boolean

One of:

true

false

cities

Object

One of:

"in": ["..."]

"not_in": ["..."]

country_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

geocoded

Boolean

One of:

true

false

localized

Boolean

One of:

true

false

state_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

zip_codes

Object

One of:

"in": ["..."]

"not_in": ["..."]

tags field

AttributeTypeValues

ids

Object

One of:

"in": ["..."]

"not_in": ["..."]

names

Object

One of:

"in": ["..."]

"not_in": ["..."]

Last updated