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

reverseDeliveryCreateWithShipping Error

reverseDeliveryCreateWithShipping Error

cmark
Shopify Partner
5 0 0

Hello,

 

I'm continuously encountering an error when attempting to create a reverse Delivery for a return via the "reverseDeliveryCreateWithShipping" mutation. I am looking for guidan

 

 

{'reverseDeliveryCreateWithShipping': {'reverseDelivery': None, 'userErrors': [{'field': ['reverseDeliveryLineItems', '0', 'quantity'], 'message': 'cannot deliver more items than are returned'}]}

 

 

I am using the exact number of items in the return via the ReverseFulfillmentOrderLineItem, so the error does not make sense to me. Here is the format of my mutation

 

 

{
   "reverseFulfillmentOrderId":"gid://shopify/ReverseFulfillmentOrder/22725722282",
   "reverseDeliveryLineItems":[
      {
         "quantity":2,
         "reverseFulfillmentOrderLineItemId":"gid://shopify/ReverseFulfillmentOrderLineItem/47696445610"
      }
   ],
   "labelInput":{
      "fileUrl":"<file_url>"
   },
   "notifyCustomer":false,
   "trackingInput":{
      "number":"123456",
      "url":"None"
   }
}

 

 

 

Is there a state that the return needs to be in in order to create a reverse delivery? I am currently following the directions in the docs here: https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-order...

 

 

Here is the Return object in question:

 

{'data': {'return': {'name': '#1113-R1',
   'returnLineItems': {'nodes': [{'id': 'gid://shopify/ReturnLineItem/48470720682',
      'quantity': 2,
      'fulfillmentLineItem': {'lineItem': {'name': "Jeni's Ice Cream 1 - Chocolate / Large"}}}]},
   'order': {'id': 'gid://shopify/Order/6284912951466'},
   'status': 'OPEN',
   'reverseFulfillmentOrders': {'edges': [{'node': {'id': 'gid://shopify/ReverseFulfillmentOrder/22725722282',
       'lineItems': {'edges': [{'node': {'id': 'gid://shopify/ReverseFulfillmentOrderLineItem/47696445610',
           'totalQuantity': 2}}]}}}]}}}

 

Replies 0 (0)