Covers all questions related to inventory management, order fulfillment, and shipping.
I don't make any progress here. 🙁
I'm helping a friend with his shop.
Until now, only two API calls were used:
GET orders.json?status=open&financial_status=paid&fulfillment_status=unshipped
to retrieve the orders, and:
POST fulfillments.json
like:
{ "fulfillment": { "location_id": 1122334455, "tracking_number": "123456789", "tracking_url": "https://carrier.com/track=123456789", "tracking_company": "Superfast", "notify_customer": true } }
to mark it as shipped/done. And that was it.
What is the easiest way to accomplish this with the new "fulfillment orders" that must be migrated to?
Thanks for your help in advance.
Solved! Go to the solution
This is an accepted solution.
Hi Patrick,
Its not too much more difficult 🙂
1) get orders/{order_id}/fulfillment_orders.json?status=open =>this returns an array
2) from the above get the fulfillment order ID of the fulfillment in question and optionally the line_items to fulfill
3) create the new fulfillment structure found here
make sure in the above structure that fulfillment_order_id = the id from step 2 and not the actual order id, make sure if you include the line_items array that you always have a non-zero value for quantity, and that its not greater than the fulfillable_quantity value (or you will get an error). If you are always fulfilling all line_items you can omit fulfillment_order_line_items.
4) post it /admin/api/2023-01/fulfillments.json
5) do a happy dance cause you are done.
Cheers,
Gary
This is an accepted solution.
Hi Patrick,
Its not too much more difficult 🙂
1) get orders/{order_id}/fulfillment_orders.json?status=open =>this returns an array
2) from the above get the fulfillment order ID of the fulfillment in question and optionally the line_items to fulfill
3) create the new fulfillment structure found here
make sure in the above structure that fulfillment_order_id = the id from step 2 and not the actual order id, make sure if you include the line_items array that you always have a non-zero value for quantity, and that its not greater than the fulfillable_quantity value (or you will get an error). If you are always fulfilling all line_items you can omit fulfillment_order_line_items.
4) post it /admin/api/2023-01/fulfillments.json
5) do a happy dance cause you are done.
Cheers,
Gary
hey Gary
we are using this endpoint
Hi there Deepak,
Well firstly you will need to change the api version to at least 2022-10.
Then follow the steps I listed above, and visit (read) the links in the above post.
cheers,
Gary
Thanks a lot for your Gary, this has worked so far. 👍
I still wonder about "Step 3" described here, that it's necessary to opt-in to fulfillment orders and provide a callback URL.
https://shopify.dev/docs/apps/fulfillment/migrate
Do I even need this or can I just omit it?
Hi Patrick,
no you can omit that if you are not building a fulfillment service app.
Cheers,
Gary
Despite doing exactly that with api version 2023-07 and I triple checked every single value, I receive the below error. Any idea what I'm doing wrong ?
422 Unprocessable Entity
I found the issue. I was getting all fulfillment_orders including the closed one. Added to the creation of a fulfillment was giving me this issue. To solve it, I filter the open fulfillment_orders only.
It's just sad that this is the kind of error we received rather than a proper message saying that we're trying to fulfill a closed one.