Is it possible to get an indication in the GraphQL API Order object (or in any other object) when a line item is "removed", such as in this example?
Currently this "removal" generates a refund and we can't differentiate between removed items and actually refunded items.
Solved! Go to the solution
You can use the refunds field on an order query to get the refunded line items applied on the order. Hope this helps, if you have any questions please don't hesitate to reach out.
Thanks for your response - unfortunately it doesn't fully answer my question.
We do use the refunds field to get refunded line items as you explained. However, the question here is how we can differentiate line items which were actually refunded from line items which were removed - for example, a case in which a seller switched one variant of a product with another variant after the order has already been paid for. The "removed" line item appears as a refund, so we cannot currently differentiate it from an actual refunded line item.
Is there a way to do this?
This is an accepted solution.
I haven't found any docs on the subject when I was also researching this question. As far as I understand, when a refund is really a refund -- it has a transaction in the `transactions` array of the refund object. But when it's a plain removal -- the `transactions` array is empty.
Hope this helps