orders
Returns a list of orders placed in the store, including data such as order status, customer, and line item details.
Use the orders query to build reports, analyze sales performance, or automate fulfillment workflows. The orders query supports pagination,
sorting, and filtering.
OrderConnection arguments
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to default•string
Filter by a case-insensitive search of multiple fields in a document.
query=Bob Normanquery=title:green hoodie- Anchor to cart_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.
cart_token:abc123- Anchor to channel•string
Filter by the channel information
handle() field.channel:webchannel:web,pos- Anchor to 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.
acceptedcharge_refundedlostneeds_responseunder_reviewwonchargeback_status:accepted- Anchor to 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.
checkout_token:abc123- Anchor to 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.
confirmation_number:ABC123- Anchor to created_at•time
Filter by the date and time when the order was created in Shopify's system.
created_at:2020-10-21T23:39:20Zcreated_at:<nowcreated_at:<=2024- Anchor to 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.
credit_card_last4:1234- Anchor to delivery_method•string
shippingpick-upretaillocalpickup-pointnonedelivery_method:shipping- Anchor to 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.
discount_code:ABC123- Anchor to email•string
Filter by the email address that's associated with the order to provide customer support or analyze purchasing patterns.
email:example@shopify.com- Anchor to financial_status•string
paidpendingauthorizedpartially_paidpartially_refundedrefundedvoidedexpiredfinancial_status:authorized- Anchor to 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.
fully_protectedpartially_protectednot_protectedpendingnot_eligiblenot_availablefraud_protection_level:fully_protected- Anchor to fulfillment_location_id•id
Filter by the fulfillment location
id(Fulfillment.location.id) field.fulfillment_location_id:123- Anchor to fulfillment_status•string
unshippedshippedfulfilledpartialscheduledon_holdunfulfilledrequest_declinedfulfillment_status:fulfilled- Anchor to location_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.location_id:123- Anchor to metafields.{namespace}.{key}•mixed
Filters resources by metafield value. Format:
metafields.{namespace}.{key}:{value}. Learn more about querying by metafield value.metafields.custom.on_sale:truemetafields.product.material:"gid://shopify/Metaobject/43458085"- Anchor to payment_id•string
Filter by the payment ID that's associated with the order to reconcile financial records or troubleshoot payment issues.
payment_id:abc123- Anchor to 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.
payment_provider_id:123- Anchor to 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.
reference_location_id:123- Anchor to return_status•string
return_requestedin_progressinspection_completereturnedreturn_failedno_returnreturn_status:in_progress- Anchor to sales_channel•string
Filter by the sales channel where the order was made to analyze performance or manage fulfillment processes.
sales_channel: some_sales_channel- Anchor to sku•string
Filter by the product variant
skufield. Learn more about SKUs.sku:ABC123- Anchor to 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_identifier:1234-12-1000- Anchor to 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.
source_name:websource_name:shopify_draft_order- Anchor to status•string
Filter by the order's status to manage workflows or analyze the order lifecycle.
openclosedcancellednot_closedstatus:open- Anchor to 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.
subtotal_line_items_quantity:10subtotal_line_items_quantity:5..20- Anchor to 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- Anchor to updated_at•time
Filter by the date and time when the order was last updated in Shopify's system.
updated_at:2020-10-21T23:39:20Zupdated_at:<nowupdated_at:<=2024
Example:
Example:
Example:
Valid values:
Example:
Example:
Example:
Example:
Example:
Valid values:
Example:
Example:
Example:
Valid values:
Example:
Valid values:
Example:
Example:
Valid values:
Example:
Example:
Example:
Example:
Example:
Example:
Valid values:
Example:
Example:
Example:
Example:
Example:
Valid values:
Example:
Example:
Example:
Example:
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to savedSearchIdsaved•ID
Search Id The ID of a saved search. The search’s query string is used as the query argument.
- Anchor to sortKeysort•Order
Key Sort Keys Default:PROCESSED_AT Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
Anchor to Possible returnsPossible returns
- Anchor to edgesedges•[Order
Edge!]! non-null The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
- Anchor to nodesnodes•[Order!]!non-null
A list of nodes that are contained in OrderEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
- Anchor to pageInfopage•Page
Info Info! non-null An object that’s used to retrieve cursor information about the current page.