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
{
orders(
first: Int
after: String
last: Int
before: String
sortKey: OrderSortKey
reverse: Boolean
) {
# OrderConnection fields
}
}Arguments
Return Type
Returns OrderConnection - A connection object containing a collection of orders with pagination support.
Example
query {
orders(first: 10, sortKey: PROCESSED_AT, reverse: true) {
edges {
cursor
node {
id
orderNumber
processedAt
totalPrice
financialStatus
fulfillmentStatus
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
}