I need to differentiate refunds from refunded fulfilled items and refunded unfulfilled items.
Shopify allows to refund both (and optionally to restock) but from the Order endpoint how do I know if the refunded item was fulfilled or unfulfilled with value no_restock ?
@tyuzu not exactly i found but you can differentiate with using the graphql.json api. In graphql api check nonFulfillableQuantity , currentQuantity & unfulfilledQuantity parameter.
Thanks @tyuzu . That’s exactly what I have tried (change my workflow).
@YPD using GraphQL API with nonFulfillableQuantity, currentQuantity and unfulfilledQuantity does not help differenciating when a refund line comes from a fulfilled or unfulfilled product (when the order is at least, partially fulfilled). Imagine having an order with only 1 product but quantity 2 with only 1 fulfillment order (one location). If you fulfill only one unit, the order status then changes to partially fulfilled. THen you refund both units (one fulfilled and the order unfulfilled) with NO restock. Using GraphQL (and API REST) there is no difference in these 2 refunds. They are exactly the same, but in my case business process in my ERP are completely different. Someone from Shopify dev team should answer that (do you know how can I post a change proposal or a ticket?).