Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

GraphQL return a fufilled item

GraphQL return a fufilled item

ykyuen
Shopify Partner
18 1 7

Hi all,

I wonder if there is a GraphQL mutation for returning an fulfilled item. The only mutation i found is the refundCreate and it has a RETURN option in the RefundLineItemRestockType.

I could successfully perform a Refund the fufilled item is doesn't mark as returned.

sc-2021-01-27-12-05-23.jpg

---

And if i click the refund btn in the order detail page, it said there is no more item available for return. so i guess there should be no more fulfilled items.

sc-2021-01-27-12-05-59.jpg

---

Here is the mutation input i used for refundCreate

    // Refund/Return item
    const refund = {
      orderId: `gid://shopify/Order/XXXXX`,
      refundLineItems: [
        {
          lineItemId: `gid://shopify/LineItem/XXX`,
          quantity: 1,
          restockType: 'RETURN',
          locationId: `gid://shopify/Location/XXXXX`
        }
      ],
      transactions: [
        {
          amount: 100,
          gateway: 'bogus',
          kind: 'REFUND',
          orderId: `gid://shopify/Order/XXXXX`,
          parentId: `gid://shopify/OrderTransaction/XXXXX`
        }
      ]
    };

---

So is there anyway i could mark the fulfilled item as RETURNED in the order detail page as show below thru API?

sc-2021-01-27-12-11-30.jpg

---

Thanks~

Regards,
Kit

Reply 1 (1)

ykyuen
Shopify Partner
18 1 7

Another problem i found is orginally the order i show above is $634.99 and i refund $100, so the remaining amount is $534.99 which is correct in the order detail page.

But in the order listing, the Total amount only contains the Shipping fee $5.99.

sc-2021-01-27-12-29-55.jpg