New Shopify Certification now available: Liquid Storefronts for Theme Developers

Set fulfillment status to "fulfilled" using REST API

drs997
Shopify Partner
15 0 3

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
Shopify Staff
1203 190 420

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