Set fulfillment status to "fulfilled" using REST API

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!

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