Let me explain my problem presenting following scenario.
This is the order I have created and partially fulfilled
Next I created one refund. I refunded qty=1 for both fulfilled and unfulfilled part. I did not restock items.
Now when I fetch such order using API I want to determine which refund line item was created for fulfilled part and which for unfulfilled. When I am looking at refunds json both refund_line_items looks the same so I can not get this information from the returned order json or maybe I am missing something?
Here is reduced json for fetched refunds:
[
{
"order_id": 4089920421971,
"restock": false,
"refund_line_items": [
{
"id": 326271696979,
"quantity": 1,
"restock_type": "no_restock",
"subtotal": 100,
"total_tax": 13,
"line_item": {
"fulfillable_quantity": 1,
"fulfillment_service": "manual",
"fulfillment_status": "partial",
"id": 10526696472659,
"price": "100.00",
"product_exists": true,
"product_id": 6685780344915,
"quantity": 4,
"requires_shipping": true,
"variant_id": 39645624664147
}
},
{
"id": 326271729747,
"quantity": 1,
"restock_type": "no_restock",
"subtotal": 100,
"total_tax": 13,
"line_item": {
"fulfillable_quantity": 1,
"fulfillment_service": "manual",
"fulfillment_status": "partial",
"id": 10526696472659,
"price": "100.00",
"product_exists": true,
"product_id": 6685780344915,
"quantity": 4,
"requires_shipping": true,
"variant_id": 39645624664147,
}
}
],
"transactions": [
{
"amount": "226.00",
"kind": "refund",
"location_id": null
}
]
}
]

