RestockingFee doesn't exist on ReturnLineItem (API version 2025-01)

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? :smiley:

Side request: can the GraphiQL app get the read_returns scope? It’s a great tool for mapping out queries.

Hi Andri,

If you try this on the unstable version - is this working for you in GraphiQL?

Hi! Weirdly enough, it’s there now–maybe the schema didn’t refresh when I tried it in the unstable version previously? I suppose that question is answered, though! Do you have any idea when it will be available in a stable version?

Hi again Andri - nothing to share on this being available in the regular version at the moment, so unfortunately you’ll only be able to use this in unstable for now. I’ve connected with the team who own this space to have the docs updated so it clearer.

Fair enough! Will just have to warn my users about inaccuracies if restocking fees are applied to returns. Thanks for the confirmation :slight_smile:

1 Like