Docs
Dashboard

orders

Query

Retrieves a paged list of orders with optional filtering, sorting, and search.

#

Arguments


after
String

Returns the elements in the list that come after the specified cursor.

before
String

Returns the elements in the list that come before the specified cursor.

first
Int

Returns the first n elements from the list.

last
Int

Returns the last n elements from the list.

query
String
A filter expression made up of terms, boolean operators, modifiers, and comparators. Combine one or more filters in a single query.
Available filters13
  • defaultstring

    Searches indexed order text such as references, customer details, and state values. Every term must match.

    Examplesbuyer@example.comERP-1042
  • idID

    Matches an order by its unique identifier.

    Exampleid:order_...
  • external_referencestring

    Matches the external reference stored on the order.

    Exampleexternal_reference:ERP-1042
  • created_atdate

    Compares the order creation date using an ISO 8601 date or timestamp.

    Examplescreated_at:>="2026-01-01"created_at:<"2026-02-01T00:00:00Z"
  • customer_idID

    Matches orders belonging to the specified customer.

    Examplecustomer_id:cus_...
  • customer_emailstring

    Matches the customer email stored on the order.

    Examplecustomer_email:buyer@example.com
  • store_idID

    Matches orders placed through the specified store.

    Examplestore_id:store_...
  • order_statestring

    Matches the order processing state.

    Exampleorder_state:confirmed
  • payment_statestring

    Matches the order payment state.

    Examplepayment_state:paid
  • shipment_statestring

    Matches the order shipment state.

    Exampleshipment_state:fulfilled
  • currency_codestring

    Matches the order currency code.

    Examplecurrency_code:EUR
  • discount_codestring

    Matches an applied discount code. The value is case-sensitive.

    Examplediscount_code:WELCOME10
  • cart_discount_idID

    Matches an order that used the specified cart discount.

    Examplecart_discount_id:cart_discount_...
sortDirection
SortDirection

Sort direction (ascending or descending).

Possible enum values
  • ASC

    Orders values from lowest to highest or alphabetically from A to Z.

  • DESC

    Orders values from highest to lowest or alphabetically from Z to A.

sortKey
OrderSortKeys

Field key to sort by.

Possible enum values
  • CREATED_AT

    Sorts by the date and time the order was created.

  • ID

    Sort by customer `ID`.

  • ORDER_NUMBER

    Sorts by the order number.

#

Payload


edges
[OrderEdge!]

A list of edges.

nodes
[Order!]

A flattened list of the nodes

pageInfo
PageInfo!

Information to aid in pagination.

totalCount
Int!

Identifies the total count of items in the connection.