I have an app that currently creates invoices from orders and refunds. I’m working on adding support for returns and exchanges as well, but I’ve hit a bit of a roadblock with restocking fees.
According to the ReturnLineItem documentation, every return line item should come with a restockingFee field. However, this field doesn’t actually seem to exist. The GraphiQL app doesn’t show it as part of the schema (GraphiQL can’t actually access returns, which is another thing I find a bit annoying, but it can access the schema). If I just go ahead and add it to my GraphQL query anyway, it causes the query to error out.
Here’s the relevant section of my query:
returnLineItems(first: 250) {
edges {
node {
id
quantity
refundableQuantity
refundedQuantity
returnReason
restockingFee {
amountSet {
shopMoney {
amount
currencyCode
}
}
}
}
}
}
With the restockingFee field included, the query fails. If I remove the restockingFee field, the query works.
This is the error I get:
Error: Field 'restockingFee' doesn't exist on type 'ReturnLineItemType'
I’m using the latest API version, 2025-01, and I have all the necessary scopes. The GraphiQL app also doesn’t have the restockingFee field when I select 2025-04 (currently the release candidate) or when I select the unstable version.
So, I’m pretty sure that the restockingFee currently doesn’t exist as part of the ReturnLineItem object, and I haven’t had any luck finding it elsewhere in the order, or anywhere else, for that matter.
Does anyone have any insights as to how I can figure out what the restocking fee is so I can accurately apply it? Or, even better, the power to add it to the API?
Side request: can the GraphiQL app get the read_returns scope? It’s a great tool for mapping out queries.