Query regarding Returns GraphQL

Hi,

We have a few queries regarding Return’s functionality in ShipHero.

  1. I am able to click on the UI to Re-Generate a Label. Is there an API to do the same function based on the RMA number?
  2. How to cancel a return in Shiphero via GraphQL also we couldn’t find one in the ShipHero portal (UI).

Thank you.

Hey @Venkatesh,

Welcome back to the Developer Community!
I’ll look into this and get back to you shortly.

Best,
RayanP

Hey @Venkatesh,

By regenerate label do you mean “Resend Label” in the UI?
image

If so there’s no way to do that via the Public API.

In regard to the second question there’s no way to actually cancel out a return via the UI or API. I would recommend making a “cancel” status through the UI. Then you can set this status through the API or UI.

You can set that status through the UI by going to the return and using the drop down on the right side.
image

If going through the Public API, you can use this mutation here:

mutation {
  return_update_status(data: { return_id: "returnid", status: "cancel" }) {
    request_id
    complexity
    return {
      id
      legacy_id
      account_id
      order_id
      partner_id
      reason
      status
      label_type
      label_cost
      cost_to_customer
      shipping_carrier
      shipping_method
      total_items_expected
      total_items_received
      total_items_restocked
      created_at
      display_issue_refund
    }
  }
}

Please let me know if you have any questions or concerns.

Best,
RayanP

Hi @sh-agent
We are trying to Re-Generate Label via API.

image (1)

Thanks for the solution for the cancelation of the return. Still have a few queries for return:

  • After canceling the return will it cancel the label as well (will it void the labels)
  • Since return_update_status mutation will only allow changing the status of the return. How to edit/update other details in return via GraphQL API.

Thank you

Hey @Venkatesh,

Unfortunately, I don’t believe the API has the capability to Re-Generate a label at the moment. Regarding the second question, it will not void the label and there is no way to update return details besides the status through the API.

If a return was entered incorrectly, I believe the best thing to do would be:

  • Void the label through the UI

  • Set the status to canceled

  • Create another return

As long as you don’t receive any SKUs to the incorrect RMA the inventory should be accurate.

Please let me know if you have any questions or concerns!

Best,
RayanP

Hi @sh-agent

Is there any way to get a particular return details and return labels through APIs?

ex: For one order we have 2 returns, I need to fetch only the second return for that order.

Any help is appreciated.

Thank you.

Hey @supritha,

Thanks for hanging in there! Looking into this issue now.
Please let me know if you have any questions or concerns.

Best,
RayanP