Simple API flow to fulfill using Fulfillment Orders - how to?

Topic summary

Developers are migrating from the deprecated fulfillment.json endpoint to the new fulfillment_orders.json API to handle partial fulfillments in their ERP integrations.

Initial Challenge:
The original poster struggled to understand the correct API flow for complete and partial fulfillments, initially receiving empty responses from the fulfillment_orders endpoint.

Working Solution:

  1. GET /orders/{order_id}/fulfillment_orders.json to retrieve fulfillment order IDs and line item IDs
  2. POST to /fulfillments.json with a body containing:
    • fulfillment_order_by_line_items array
    • fulfillment_order_id from step 1
    • fulfillment_order_line_items with line item IDs and quantities
    • Optional tracking info and customer notification settings

Key Troubleshooting Tip:
If receiving empty arrays from the fulfillment_orders endpoint, try updating app permissions or creating a new private app.

Ongoing Issues:
Several users report receiving empty fulfillments arrays in responses despite using correct IDs and API version 2024-04, suggesting potential permission or configuration problems. The discussion remains open with users seeking additional guidance on proper implementation.

Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

We are ERP system developers and made integration using the old fulfillment.json endpoint, where we only do complete fulfillments.

Now we need to be able to handle partial fulfillments, and want to move to the new fulfillment_orders.json endpoint.

I cant figure out the documentation for the simple flow we want to do.

We want this simple flow:

  1. Order is created in Shopify
  2. Order is imported to ERP
  3. ERP do complete or partial fulfillment and capture
    1. Once rest of products are ready to ship a complete or partial fulfillment is done again. Step 3 and 3.1 are repeated until order is complete

I get data on the order on fulfillment_orders endpoint after creation of the shopify order:

“id”: 5867286823165,
“shop_id”: 64805961981,
“order_id”: 4803980919037,
“assigned_location_id”: 69589598461,
“request_status”: “unsubmitted”,
“status”: “open”,
“supported_actions”: [
“create_fulfillment”,
“hold”

  1. How to call, if we should fulfill the whole order now?
  2. How to call, if we needed only partial fulfillment?
    1. And how to fulfill rest afterwards?

Thanks!

2 Likes

We seemed to get our head around it. First problem was that we got empty response on …/orders//fulfillment_orders.json.

We got this flow working now:

  1. GET …orders/(ordreid)/fulfillment_orders.json to see fulfillmentorder to handle, copy id of fulfillment order and the id of the lines

  2. POST …/fulfillments.json with a body of something like this

    “fulfillment”: {

    “message”: “The package was shipped this morning.”

    “notify_customer”: false,

    “tracking_info”: {

    “number”: 112233,

    “url”: https://www.dr.dk,

    “company”: “Danmarks Radio shipping”

    },

    “line_items_by_fulfillment_order”: [

    {

    “fulfillment_order_id”: <id from get in 1>,

    “fulfillment_order_line_items”: [

    {

    “id”: <line id from 1>,

    “quantity”: 8

    },

    {

    “id”: <lineid from 1>,

    “quantity”: 5

    }

    ]

    }

If you are struggling with empty array response on GET …/fulfillment_orders.json, try updating permissions or creating a new private app.

3 Likes

Thank you very much for following up on the question and posting your solution!
It was very helpful

Cheers,

Matthias

Hey Mads_W,

I’m also facing issues in creating fulfillment for an order using REST API service, as of now my current configuration for Orders is ‘mark order as un-fulfilled initially’. Can you please share the endpoint and process that you’re following now to achieve this as per api version 2023-01.

Thanks

Did you found any solution for that ?

Hey Cosmekarn,

maybe I can help, we have order-fulfilments running with api version “2023-04”, what problem exactly are you facing?

cheers,

Matthias

Hello @Matthias7 I need your help on shopfiy order fulfillment:

POST: admin/api/2024-04/orders/5868592857384/fulfillments.json

Body:

{
“fulfillment”: {
“message”: “The package was shipped this morning.”,
“notify_customer”: false,
“location_id”: 89816072488,
“tracking_info”: {
“number”: 112233,
“url”: “https://www.dr.dk”,
“company”: “Other”
},
“line_items_by_fulfillment_order”: [
{
“fulfillment_order_id”: 6835502350632,
“fulfillment_order_line_items”: [
{
“id”: 15251424149800
}
]

}
]
}
}

I’m using correct ID I have checked multiple time.

Response:

{
“fulfillments”:
}