Development discussions around Shopify APIs
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}]}
Solved! Go to the solution
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
That looks ok, maybe the order was deleted?
No, Order is already in Shopify.
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
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 ?
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
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
User | RANK |
---|---|
49 | |
16 | |
9 | |
7 | |
5 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023