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.
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.
A late response to this question. The order_line_refund object has an option where restock_type = ‘no_restock’ … this response seems line up with our removed items.