# orders Get the authenticated customer's orders. Requires a valid customer access token via the @storeContext directive. ## Authentication > **Authentication Required**: Secret API key with scope `order:read` ## Query Structure ```graphql { orders( first: Int after: String last: Int before: String sortKey: OrderSortKey reverse: Boolean ) { # OrderConnection fields } } ``` ## Arguments | Argument | Type | Required | Description | |----------|------|----------|-------------| | first | Int | No | Returns the first n elements. | | after | String | No | Returns elements after cursor. | | last | Int | No | Returns the last n elements. | | before | String | No | Returns elements before cursor. | | sortKey | [OrderSortKey](/reference/storefront/v1/objects/order-sort-key) | No | The key to sort orders by. | | reverse | Boolean | No | Reverse the order of the underlying list. | ## Return Type Returns [`OrderConnection`](/reference/storefront/v1/connections/order-connection) - A connection object containing a collection of orders with pagination support. ## Example ```graphql query { orders(first: 10, sortKey: PROCESSED_AT, reverse: true) { edges { cursor node { id orderNumber processedAt totalPrice financialStatus fulfillmentStatus } } pageInfo { hasNextPage hasPreviousPage } } } ``` ## Related Types - [`OrderConnection`](/reference/storefront/v1/connections/order-connection) - [`OrderSortKey`](/reference/storefront/v1/objects/order-sort-key)