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

customer field

line_items field

Line item options field

market field

order field

payment_method field

shipping_address field

tags field

Last updated