What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Set fulfillment status to "fulfilled" using REST API

Set fulfillment status to "fulfilled" using REST API

drs997
Shopify Partner
17 0 5

Hello,

 

I am trying to change an order's fulfillment staus to "Fulfilled". The order is not actually being shipped. It just needs to be manually fulfilled.

 

From what I understand, I need to

 

  1. GET ...orders/(orderId)/fulfillment_orders.json to get the "fulfillment order id"    (response is always empty?)
  2. POST .../fulfillments.json with a body of something like this 

        "fulfillment": {

            "line_items_by_fulfillment_order": [

                {

                    "fulfillment_order_id": <id from get in 1>,

                }.....

 

I have added the necesarry scopes to allow for this, but step (1) GET ..../fulfillment_orders.json always returns an empty array response.

 

What am I missing here? Is this the correct way to set an order to "fulfilled"?

 

Many thanks!

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 525

Hey @drs997 - great question!

 

As long as the product in an order has a location attached to it and is set as a "physical item" with inventory for the product associated with that specific location, a fulfillment order will automatically be created when the order is completed. Then you're totally right that you'd want to create a fulfillment using the fulfillment endpoint here. Once that's done and you have a fulfillment associated with the fulfillment order for an order (it is a little bit like a nesting doll for sure!) - you can then create a fulfillment event to set the status of the order to "delivered" using this resource

Hope this helps/makes sense - let us know if we can clarify further, happy to dig into this more deeply if needed. 

 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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