Discussing APIs and development related to customers, discounts, and order management.
Hi, Shopify devs,
After I create a refund with the line_item, the fulfillable_quantity of line_item didn't change to 0 and the line_item wasn't removed in Admin
There is my request.
{
"refund":{
"currency":"EUR",
"note":"",
"notify":true,
"refund_line_items":[
{
"line_item_id":"10188079136955",
"quantity":3,
"restock_type":"no_restock"
}
],
"shipping":{
"full_refund":true
},
"transactions":[
{
"amount":21.36,
"currency":"EUR",
"gateway":"gift_card",
"kind":"refund",
"order_id":"3951296970939",
"parent_id":"4905726017723"
}
]
}
}
Thanks!!!
Hi,
this is your problem:
"restock_type":"no_restock"
This tells shopify not to re-add the returned item to the availble stock.
You need to change this to refund in order to get the item to be added to the available stock
from the docs:
You also need to make sure you include the location_id if you set the restock_type to return or it probably won't be able to correctly return the item.
Cheers
Thank you for your reply. But the restock_type was no_restock and the line_item was removed after I cancelled the order and didn't tick the 'Restock items' via Admin not the API. Why it's different from the API?