Order Fulfillment returns "ResourceNotFound: Not Found:"

Solved
nilesh_sheliya
Tourist
4 1 0

When I try to create fulfilment for order by api, I am always getting ResourceNotFound error. I passing all the information correctly.

Error : ResourceNotFound: Not Found: https://samplize.myshopify.com/admin/api/2020-07/orders/2814582685798/fulfillments.json

Below is the parameters that I am passing in request.
{'order_id': 2814582685798, 'tracking_numbers': ['9470111298370372642929'], 'tracking_company': 'USPS', 'location_id': '3219128360', 'line_items': [{'id': '6100644790374', 'quantity': 1}, {'id': '2355060244582', 'quantity': 1}, {'id': '6100644855910', 'quantity': 1}, {'id': '6100644823142', 'quantity': 1}, {'id': '6100644757606', 'quantity': 1}]}

Accepted Solution (1)

Accepted Solutions
nilesh_sheliya
Tourist
4 1 0

This is an accepted solution.

Hi @_JCC_ 

You are right. I was passing shipping line also in Fulfillment request parameter. Its solved my issue.

Thanks

View solution in original post

Replies 6 (6)
florinanghel
Shopify Partner
136 17 34

That looks ok, maybe the order was deleted?

nilesh_sheliya
Tourist
4 1 0

No, Order is already in Shopify.

_JCC_
Shopify Staff
Shopify Staff
196 27 53

Hi @nilesh_sheliya,

Happy to help you out with this. I've experienced a similar error in the past, and in that instance the fulfillment request was attempting to fulfill the shipping line, which isn't necessary or supported. I also wanted to note that if you're fulfilling an entire order (not back ordering anything) you don't need to specify the individual line items as documented here.

I Hope this helps, and if it's not shipping line related or if you have any questions please don't hesitate to reach out.

Regards,

John

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

nilesh_sheliya
Tourist
4 1 0

Hi John,

Thanks for the solution. If I update fulfillment for whole order without line_items parameter, its working well and order is fulfilled. But if I want to fulfill only few order lines of order, than how can we achieve it ? For example, Order have 5 order lines, I need to fulfill only 3 order lines, than is it not possible ?

_JCC_
Shopify Staff
Shopify Staff
196 27 53

Hey @nilesh_sheliya,

Partial fulfillment is absolutely possible and would be handled exactly as you were doing in the example request provided. My prior experience on a similar issue makes me believe that one of the line items specified in your original example is not a line item but a shipping line. The shipping fee is not part of the line items array on an order, and can not be fulfilled.

I would review the order from your sample either in the Shopify admin or with an API to request to get the order payload. Do you have five line items on the order as indicated by the sample request or is it four? If it's four, I suspect you would find one of the id's you specified is associated with a shipping fee which isn't part of the line_items array and doesn't need to be fulfilled.

Regards,

John  

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

nilesh_sheliya
Tourist
4 1 0

This is an accepted solution.

Hi @_JCC_ 

You are right. I was passing shipping line also in Fulfillment request parameter. Its solved my issue.

Thanks