orders Count
Requires access scope or access scope.
Returns the number of
orders in
the shop. You can filter orders using search
syntax or a ,
and set a maximum count limit to control query performance.
Use the query argument to filter the count by criteria like order status, financial state,
or fulfillment status. The response includes both the count value and its
precision, indicating whether the count is exact or an estimate.
The count is limited to 10,000 orders by default. Use the limit
argument to adjust this value, or pass null for no limit. Limited to a
maximum of 10000 by default.
The count is limited to 10,000 orders by default. Use the limit
argument to adjust this value, or pass null for no limit. Limited to a
maximum of 10000 by default.
Note: The count is limited to 10,000 orders by default. Use the <a href="https://shopify.dev/docs/api/admin-graphql/latest/queries/ordersCount#arguments-limit"><code>limit</code></a> argument to adjust this value, or pass <code>null</code> for no limit. Limited to a maximum of 10000 by default.
Arguments
- limit (Int)
- query (String)
- savedSearchId (ID)
- Anchor to limitlimit•IntDefault:10000
The upper bound on count value before returning a result. Use
nullto have no limit.- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators.
name type description acceptable_values default_value example_use default string Filter by a case-insensitive search of multiple fields in a document. - query=Bob Norman
-query=title:green hoodiecart_token string Filter by the cart token's unique value to track abandoned cart conversions or troubleshoot checkout issues. The token references the cart that's associated with an order. - channel string Filter by the channel information handle( ) field.- channel:web
-channel:web,poschannel_id id Filter by the channel idfield. - chargeback_status string Filter by the order's chargeback status. A chargeback occurs when a customer questions the legitimacy of a charge with their financial institution. - accepted
-
-lost
-
-
-won- checkout_token string Filter by the checkout token's unique value to analyze conversion funnels or resolve payment issues. The checkout token's value references the checkout that's associated with an order. - confirmation_number string Filter by the randomly generated alpha-numeric identifier for an order that can be displayed to the customer instead of the sequential order name. This value isn't guaranteed to be unique. - created_at time Filter by the date and time when the order was created in Shopify's system. -
-
-credit_card_last4 string Filter by the last four digits of the payment card that was used to pay for the order. This filter matches only the last four digits of the card for heightened security. - current_total_price float Filter by the current total price of the order in the shop currency, including any returns/refunds/removals. This filter supports both exact values and ranges. -
- `current_total_price:>=5.00current_total_price:<=20.99` customer_id id Filter orders by the customer idfield. - delivery_method string Filter by the delivery field. - shipping
-pick-up
-retail
-local
-pickup-point
-none- discount_code string Filter by the case-insensitive discount code that was applied to the order at checkout. Limited to the first discount code used on an order. Maximum characters: 255. - email string Filter by the email address that's associated with the order to provide customer support or analyze purchasing patterns. - email:example@shopify.comfinancial_status string Filter by the order field. - paid
-pending
-authorized
-
-
-refunded
-voided
-expired- fraud_protection_level string Filter by the level of fraud protection that's applied to the order. Use this filter to manage risk or handle disputes. -
-
-
-pending
-
-- fulfillment_location_id id Filter by the fulfillment location id( Fulfillment.location.id) field.- fulfillment_status string Filter by the field to prioritize shipments or monitor order processing. - unshipped
-shipped
-fulfilled
-partial
-scheduled
-
-unfulfilled
-- gateway string Filter by the field. Use this filter to find orders that were processed through specific payment providers like Shopify Payments, PayPal, or other custom payment gateways. - id id Filter by idrange.- id:1234
-id:>=1234
-id:<=1234location_id id Filter by the location idthat's associated with the order to view and manage orders for specific locations. For POS orders, locations must be defined in the Shopify admin under Settings > Locations. If no ID is provided, then the primary location of the shop is returned. - metafields.{namespace}.{key} mixed Filters resources by metafield value. Format: metafields.{namespace}.{key}:{value}. Learn more aboutquerying by metafield value. -
-name string Filter by the order namefield. - name:1001-Apayment_id string Filter by the payment ID that's associated with the order to reconcile financial records or troubleshoot payment issues. - payment_provider_id id Filter by the ID of the payment provider that's associated with the order to manage payment methods or troubleshoot transactions. - po_number string Filter by the order field. - processed_at time Filter by the order field. - reference_location_id id Filter by the ID of a location that's associated with the order, such as locations from fulfillments, refunds, or the shop's primary location. - return_status string Filter by the order's to monitor returns processing and track which orders have active returns.
-
-returned
-
-| | -| | risk_level | string | Filter by the order risk assessmentfield. | -high
-medium
-low
-none
-pending| | -| | sales_channel | string | Filter by the sales channel where the order was made to analyze performance or manage fulfillment processes. | | | -| | sku | string | Filter by the product variantskufield. Learn more about SKUs. | | | -| | source_identifier | string | Filter by the ID of the order placed on the originating platform, such as a unique POS or third-party identifier. This value doesn't correspond to the Shopify ID that's generated from a completed draft order. | | | -| | source_name | string | Filter by the platform where the order was placed to distinguish between web orders, POS sales, draft orders, or third-party channels. Use this filter to analyze sales performance across different ordering methods. | | | -
-| | status | string | Filter by the order's status to manage workflows or analyze the order lifecycle. | -open
-closed
-cancelled
-| | -status:open| | subtotal_line_items_quantity | string | Filter by the total number of items across all line items in an order. This filter supports both exact values and ranges, and is useful for identifying bulk orders or analyzing purchase volume patterns. | | | -
-| | tag | string | Filter objects by thetagfield. | | | -| | tag_not | string | Filter by objects that don’t have the specified tag. | | | -| | test | boolean | Filter by test orders. Test orders are made using the Shopify Bogus Gateway or a payment provider with test mode enabled. | | | -test:true| | total_weight | string | Filter by the order weight. This filter supports both exact values and ranges, and is to be used to filter orders by the total weight of all items (excluding packaging). It takes a unit of measurement as a suffix. It accepts the following units: g, kg, lb, oz. | | | -
-| | updated_at | time | Filter by the date and time when the order was last updated in Shopify's system. | | | -
-| You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to savedSearchIdsaved•ID
Search Id
Anchor to Possible returnsPossible returns
- Count (Count)
- Anchor to CountCount•Count
A numeric count with precision information indicating whether the count is exact or an estimate.
- Anchor to countcount•Int!non-null
The count of elements.
- Anchor to precisionprecision•Count
Precision! non-null The count's precision, or the exactness of the value.