Filters

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

To filter the results of a query on the order 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 order 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

refunds field

shipping_address field

shipments field

Shipment stock_location field

Shipment shipping_method field

Shipment shipping_category field

Shipment tags field

tags field

Last updated