Creating a fulfillment gives 'Line Item {{LINE ITEM ID}} does not exist' but the line item exists'

Highlighted
Shopify Partner
54 1 11

Hello,

When using API version 2020-04 and creating a fulfillment I am getting a strange error on some orders.

 

The error states

Line Item {{LINE ITEM ID}} does not exist' but the line item exists

 

when passing a line item ID that does exist on the order.  This has only started happening recently.  Is there anyway to get a fix for this?

0 Likes
Shopify Staff (Retired)
Shopify Staff (Retired)
624 102 127

Hi @Corknine ,

 

Could you provide the value of the X-Request-ID header from the Shopify API error response? With this response header we can go through our platform logs and see exactly why this error happened. If you are unable to provide this, please provide information about the Shop, Line Item ID, and query that is causing these errors. 

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
Shopify Partner
54 1 11

Hi @hassain,

Thank you for getting back to us. 

 

A few request id's with this issue are provided below.  I can provide many more if needed.  Let me know if you need anything else from us or if you find out what is going on and why are are unable to create fulfillments for these items.  Thank You.

 

07c6bd34-0e25-49e3-9e3a-2fb2332b7140

994aa6df-ce85-4370-8661-d21660852d99

69e589d7-3688-411c-955e-fe811bc715c2

70cdf77e-c78e-451c-8e94-fbaaaae2a0c0

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
619 76 139

Hey @Corknine,

 

We checked the logs for this one and I believe I can see what's happening. The line_item returning an error was assigned to a fulfillment_service at the time the order was created, but has since been switched to have inventory managed by Shopify. Your API call is attempting to fulfill the item through the fulfillment_service, but the call is failing since the item is no longer assigned to that service.

 

To be honest I'm not 100% sure how the API is supposed to respond when the fulfillment_service has been modified after an order is placed, so I'm going to raise this with our developers for clarification. In the meantime, you can try temporarily re-assigning that variant to the fulfillment service and attempt the fulfillment again. I'll post here with an update when I get word back from our developers.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
Shopify Partner
54 1 11

Hi @_JB 

That seems strange.  I am not really seeing that.  For example on request id 

787bf853-3312-47c6-93b7-952681ebb8da

 

The fulfillment service on the line_item and currently on the variant are both set the the fulfillment service I am trying to create the fulfillment for.  Am I missing something?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
619 76 139

Hey @Corknine,

 

This request looks different, and the call looks to have been made correctly so I'm not sure where the error is coming from. I'm going to move this to DM so I can get some more details from you. If anyone else reading along is having a similar problem, please let me know here.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes