{
orders(
query: “financial_status:refunded,partially_refunded AND created_at:>2023-05-01”
) {
edges {
node {
id
discountCodes
discountCode
createdAt
currentSubtotalLineItemsQuantity
name
note
netPayment
processedAt
returnStatus
subtotalPrice
subtotalLineItemsQuantity
taxesIncluded
totalPrice
totalRefunded
totalReceived
totalTax
totalShippingPrice
totalDiscounts
updatedAt
unpaid
lineItems {
edges {
node {
id
currentQuantity
canRestock
discountedTotal
discountedUnitPrice
fulfillableQuantity
fulfillmentStatus
isGiftCard
merchantEditable
name
nonFulfillableQuantity
originalTotal
originalUnitPrice
quantity
refundableQuantity
requiresShipping
restockable
sku
taxable
title
totalDiscount
unfulfilledDiscountedTotal
unfulfilledOriginalTotal
unfulfilledQuantity
variantTitle
vendor
}
}
}
billingAddressMatchesShippingAddress
canMarkAsPaid
canNotifyCustomer
cancelReason
cancelledAt
capturable
cartDiscountAmount
clientIp
closed
closedAt
confirmationNumber
confirmed
currencyCode
currentTotalWeight
customerAcceptsMarketing
customerLocale
displayFinancialStatus
displayFulfillmentStatus
dutiesIncluded
edited
email
estimatedTaxes
fulfillable
fullyPaid
hasTimelineComment
landingPageDisplayText
landingPageUrl
legacyResourceId
merchantEditable
merchantEditableErrors
paymentGatewayNames
phone
poNumber
presentmentCurrencyCode
referralCode
referrerDisplayText
referrerUrl
refundable
registeredSourceUrl
requiresShipping
restockable
riskLevel
sourceIdentifier
sourceName
statusPageUrl
tags
taxExempt
test
totalCapturable
totalWeight
}
}
}
}
- You can use the
refunds
field within theorder
query to fetch details about refunds associated with an order. This includes refund notes, total refunded amounts, and refund line items. - Use the suggestedRefund field to calculate potential refund amounts for specific line items or shipping costs.
- Use the exchangeV2s field within the order query to fetch exchange details.
I have tested what you’ve said and am getting what I need minus the exchange portion. Anytime I try using the exchangeV2s, I get the following: GraphQL Query execution failed with Shopify GraphQL Error Code: ACCESS_DENIED. I know a while back, this was a beta flag feature. Is this still the case? How do I get access to the exchangeV2s?
It does seem this is still in beta: ExchangeV2s field is available behind beta flag on order graphql - Shopify developer changelog
You could contact support directly and request access to this field