--- title: orders - GraphQL Admin description: >- Returns a list of [orders](https://shopify.dev/api/admin-graphql/latest/objects/Order) 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](https://shopify.dev/docs/api/usage/pagination-graphql), [sorting](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#arguments-sortKey), and [filtering](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#arguments-query). api_version: 2026-01 api_name: admin type: query api_type: graphql source_url: html: 'https://shopify.dev/docs/api/admin-graphql/latest/queries/orders' md: 'https://shopify.dev/docs/api/admin-graphql/latest/queries/orders.md' --- # orders query Returns a list of [orders](https://shopify.dev/api/admin-graphql/latest/objects/Order) 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](https://shopify.dev/docs/api/usage/pagination-graphql), [sorting](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#arguments-sortKey), and [filtering](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#arguments-query). ## OrderConnection arguments [OrderConnection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/OrderConnection) * after * before * first * last * query * reverse * savedSearchId * sortKey *** ## Possible returns * edges * nodes * pageInfo *** ## Examples * ### Retrieve a list of orders #### Description This query retrieves the first 10 \[\`orders\`]\(https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) using \[pagination]\(https://shopify.dev/docs/api/usage/pagination-graphql) and returns order IDs. #### Query ```graphql query { orders(first: 10) { edges { cursor node { id } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2026-01/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { orders(first: 10) { edges { cursor node { id } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { orders(first: 10) { edges { cursor node { id } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { orders(first: 10) { edges { cursor node { id } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { orders(first: 10) { edges { cursor node { id } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } }`, }); ``` #### Response ```json { "orders": { "edges": [ { "cursor": "eyJsYXN0X2lkIjoxMjYyMTY1MTYsImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "node": { "id": "gid://shopify/Order/126216516" } }, { "cursor": "eyJsYXN0X2lkIjoxNDg5Nzc3NzYsImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "node": { "id": "gid://shopify/Order/148977776" } }, { "cursor": "eyJsYXN0X2lkIjoyMzUyNDAzMDIsImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "node": { "id": "gid://shopify/Order/235240302" } }, { "cursor": "eyJsYXN0X2lkIjozNTc5NDQ4NTQsImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "node": { "id": "gid://shopify/Order/357944854" } }, { "cursor": "eyJsYXN0X2lkIjo0MDQ0ODE1NzUsImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "node": { "id": "gid://shopify/Order/404481575" } }, { "cursor": "eyJsYXN0X2lkIjo0MDkyMTQzNjMsImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "node": { "id": "gid://shopify/Order/409214363" } }, { "cursor": "eyJsYXN0X2lkIjo0NzE4NjExMjksImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "node": { "id": "gid://shopify/Order/471861129" } }, { "cursor": "eyJsYXN0X2lkIjo0ODA3OTYxODksImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "node": { "id": "gid://shopify/Order/480796189" } }, { "cursor": "eyJsYXN0X2lkIjo1MjcyMjkyODksImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "node": { "id": "gid://shopify/Order/527229289" } }, { "cursor": "eyJsYXN0X2lkIjo1NTY1Mjc2MzgsImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "node": { "id": "gid://shopify/Order/556527638" } } ], "pageInfo": { "hasNextPage": true, "hasPreviousPage": false, "startCursor": "eyJsYXN0X2lkIjoxMjYyMTY1MTYsImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9", "endCursor": "eyJsYXN0X2lkIjo1NTY1Mjc2MzgsImxhc3RfdmFsdWUiOiIyMDA1LTA3LTMxIDE1OjU3OjExLjAwMDAwMCJ9" } } } ``` * ### Retrieve a list of orders using their IDs and GraphQL aliases #### Description This query demonstrates GraphQL aliases such as \`order1\` and \`order2\` to fetch multiple orders in a single query. Without aliases, requesting the same field twice would cause an error due to duplicate response keys. #### Query ```graphql query { order1: order(id: "gid://shopify/Order/148977776") { name } order2: order(id: "gid://shopify/Order/1073459961") { name } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2026-01/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { order1: order(id: \"gid://shopify/Order/148977776\") { name } order2: order(id: \"gid://shopify/Order/1073459961\") { name } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { order1: order(id: "gid://shopify/Order/148977776") { name } order2: order(id: "gid://shopify/Order/1073459961") { name } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { order1: order(id: "gid://shopify/Order/148977776") { name } order2: order(id: "gid://shopify/Order/1073459961") { name } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { order1: order(id: "gid://shopify/Order/148977776") { name } order2: order(id: "gid://shopify/Order/1073459961") { name } }`, }); ``` #### Response ```json { "order1": { "name": "#1001" }, "order2": { "name": "#1018" } } ``` * ### Retrieve specific order details #### Description This query retrieves the first five \[\`orders\`]\(https://shopify.dev/api/admin-graphql/latest/objects/Order), including status information, financial data, and a list of \[line items]\(https://shopify.dev/api/admin-graphql/latest/objects/LineItem). This query is useful for order processing, fulfillment, and financial reporting. #### Query ```graphql query { orders(first: 5) { edges { node { id name createdAt displayFinancialStatus displayFulfillmentStatus totalPriceSet { shopMoney { amount currencyCode } } subtotalPriceSet { shopMoney { amount currencyCode } } email shippingAddress { address1 city provinceCode zip } lineItems(first: 5) { edges { node { name quantity sku variant { id title } } } } } } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2026-01/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { orders(first: 5) { edges { node { id name createdAt displayFinancialStatus displayFulfillmentStatus totalPriceSet { shopMoney { amount currencyCode } } subtotalPriceSet { shopMoney { amount currencyCode } } email shippingAddress { address1 city provinceCode zip } lineItems(first: 5) { edges { node { name quantity sku variant { id title } } } } } } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { orders(first: 5) { edges { node { id name createdAt displayFinancialStatus displayFulfillmentStatus totalPriceSet { shopMoney { amount currencyCode } } subtotalPriceSet { shopMoney { amount currencyCode } } email shippingAddress { address1 city provinceCode zip } lineItems(first: 5) { edges { node { name quantity sku variant { id title } } } } } } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { orders(first: 5) { edges { node { id name createdAt displayFinancialStatus displayFulfillmentStatus totalPriceSet { shopMoney { amount currencyCode } } subtotalPriceSet { shopMoney { amount currencyCode } } email shippingAddress { address1 city provinceCode zip } lineItems(first: 5) { edges { node { name quantity sku variant { id title } } } } } } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { orders(first: 5) { edges { node { id name createdAt displayFinancialStatus displayFulfillmentStatus totalPriceSet { shopMoney { amount currencyCode } } subtotalPriceSet { shopMoney { amount currencyCode } } email shippingAddress { address1 city provinceCode zip } lineItems(first: 5) { edges { node { name quantity sku variant { id title } } } } } } } }`, }); ``` #### Response ```json { "orders": { "edges": [ { "node": { "id": "gid://shopify/Order/158040885", "name": "#2000", "createdAt": "2024-01-01T00:00:00Z", "displayFinancialStatus": "PAID", "displayFulfillmentStatus": "UNFULFILLED", "totalPriceSet": { "shopMoney": { "amount": "2000.0", "currencyCode": "CAD" } }, "subtotalPriceSet": { "shopMoney": { "amount": "2000.0", "currencyCode": "CAD" } }, "email": "bob@example.com", "shippingAddress": null, "lineItems": { "edges": [ { "node": { "name": "Draft - 151cm", "quantity": 10, "sku": "draft-151", "variant": { "id": "gid://shopify/ProductVariant/168923715", "title": "151cm" } } } ] } } }, { "node": { "id": "gid://shopify/Order/199007853", "name": "#2006", "createdAt": "2024-01-01T00:00:00Z", "displayFinancialStatus": "PAID", "displayFulfillmentStatus": "UNFULFILLED", "totalPriceSet": { "shopMoney": { "amount": "2000.0", "currencyCode": "CAD" } }, "subtotalPriceSet": { "shopMoney": { "amount": "2000.0", "currencyCode": "CAD" } }, "email": "bob@example.com", "shippingAddress": null, "lineItems": { "edges": [] } } }, { "node": { "id": "gid://shopify/Order/212949620", "name": "#2002", "createdAt": "2024-01-01T00:00:00Z", "displayFinancialStatus": "PAID", "displayFulfillmentStatus": "UNFULFILLED", "totalPriceSet": { "shopMoney": { "amount": "2000.0", "currencyCode": "CAD" } }, "subtotalPriceSet": { "shopMoney": { "amount": "2000.0", "currencyCode": "CAD" } }, "email": "bob@example.com", "shippingAddress": null, "lineItems": { "edges": [] } } }, { "node": { "id": "gid://shopify/Order/294238686", "name": "#2009", "createdAt": "2024-01-01T00:00:00Z", "displayFinancialStatus": "PAID", "displayFulfillmentStatus": "UNFULFILLED", "totalPriceSet": { "shopMoney": { "amount": "2000.0", "currencyCode": "CAD" } }, "subtotalPriceSet": { "shopMoney": { "amount": "2000.0", "currencyCode": "CAD" } }, "email": "bob@example.com", "shippingAddress": null, "lineItems": { "edges": [] } } }, { "node": { "id": "gid://shopify/Order/316002265", "name": "#2003", "createdAt": "2024-01-01T00:00:00Z", "displayFinancialStatus": "PAID", "displayFulfillmentStatus": "UNFULFILLED", "totalPriceSet": { "shopMoney": { "amount": "2000.0", "currencyCode": "CAD" } }, "subtotalPriceSet": { "shopMoney": { "amount": "2000.0", "currencyCode": "CAD" } }, "email": "bob@example.com", "shippingAddress": null, "lineItems": { "edges": [] } } } ] } } ``` * ### Retrieve the first 10 orders updated after December 1, 2019 #### Description This query retrieves the first 10 \[\`orders\`]\(https://shopify.dev/api/admin-graphql/latest/objects/Order) updated after December 1, 2019. The example shows how to use the \[\`updated\_at\`]\(https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#argument-query-filter-updated\_at) parameter to determine the orders that were updated after the specified date. Refer to \[pagination]\(https://shopify.dev/api/usage/pagination-graphql) for best practices on handling larger result sets. #### Query ```graphql query { orders(first: 10, query: "updated_at:>2019-12-01") { edges { node { id updatedAt } } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2026-01/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { orders(first: 10, query: \"updated_at:>2019-12-01\") { edges { node { id updatedAt } } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { orders(first: 10, query: "updated_at:>2019-12-01") { edges { node { id updatedAt } } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { orders(first: 10, query: "updated_at:>2019-12-01") { edges { node { id updatedAt } } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { orders(first: 10, query: "updated_at:>2019-12-01") { edges { node { id updatedAt } } } }`, }); ``` #### Response ```json { "orders": { "edges": [ { "node": { "id": "gid://shopify/Order/158040885", "updatedAt": "2024-01-01T12:34:43Z" } }, { "node": { "id": "gid://shopify/Order/199007853", "updatedAt": "2024-01-01T12:34:43Z" } }, { "node": { "id": "gid://shopify/Order/212949620", "updatedAt": "2024-01-01T12:34:43Z" } }, { "node": { "id": "gid://shopify/Order/294238686", "updatedAt": "2024-01-01T12:34:43Z" } }, { "node": { "id": "gid://shopify/Order/316002265", "updatedAt": "2024-01-01T12:34:43Z" } }, { "node": { "id": "gid://shopify/Order/459506686", "updatedAt": "2024-01-01T12:34:43Z" } }, { "node": { "id": "gid://shopify/Order/634584900", "updatedAt": "2024-01-01T12:34:43Z" } }, { "node": { "id": "gid://shopify/Order/744797037", "updatedAt": "2024-01-01T12:34:43Z" } }, { "node": { "id": "gid://shopify/Order/1001810659", "updatedAt": "2024-01-01T12:34:43Z" } }, { "node": { "id": "gid://shopify/Order/1021030140", "updatedAt": "2024-01-01T12:34:43Z" } } ] } } ``` * ### Retrieve the first 10 orders with authorized payments #### Description This query retrieves the first 10 \[orders]\(https://shopify.dev/api/admin-graphql/latest/objects/Order) with authorized payments. For individual payment verification, refer to the \[\`orderPaymentStatus\`]\(https://shopify.dev/api/admin-graphql/latest/queries/orderPaymentStatus) query. #### Query ```graphql query { orders(first: 10, query: "financial_status:authorized") { edges { node { id displayFinancialStatus } } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2026-01/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { orders(first: 10, query: \"financial_status:authorized\") { edges { node { id displayFinancialStatus } } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { orders(first: 10, query: "financial_status:authorized") { edges { node { id displayFinancialStatus } } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { orders(first: 10, query: "financial_status:authorized") { edges { node { id displayFinancialStatus } } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { orders(first: 10, query: "financial_status:authorized") { edges { node { id displayFinancialStatus } } } }`, }); ``` #### Response ```json { "orders": { "edges": [ { "node": { "id": "gid://shopify/Order/471861129", "displayFinancialStatus": "AUTHORIZED" } }, { "node": { "id": "gid://shopify/Order/527229289", "displayFinancialStatus": "AUTHORIZED" } }, { "node": { "id": "gid://shopify/Order/751082136", "displayFinancialStatus": "AUTHORIZED" } }, { "node": { "id": "gid://shopify/Order/431501862", "displayFinancialStatus": "AUTHORIZED" } } ] } } ```