API Issue - Fulfillment orders not being created automatically?

API Issue - Fulfillment orders not being created automatically?

LPAN012345
New Member
5 0 0

Hi,

Basically all I want to do is set the order fulfillment status to "Fulfilled" as you can do via the button in the main system.

In the main system when I hover over the "Fulfill Item" button I get the URL "https://admin.shopify.com/store/xxxxxxxx/orders/5445872681262/fulfillment_orders/6387621364014/fulfi..."

However, if I use "admin/api/2023-07/orders/5445872681262/fulfillment_orders.json" there aren't any fulfillment orders listed

Then if I try "admin/api/2023-04/fulfillment_orders/6387621364014.json" I get "
errors": "Fulfillment order does not exist."


So how do I create fulfillment orders?

For info, we sell physical products we have in stock on-site and do not use any 3rd parties to fulfill our orders.

Any help would be much appreciated.
Replies 3 (3)

SBD_
Shopify Staff
1831 273 418

Hey @LPAN012345 

 

Sorry for the earlier bumsteer.

 

The process is to:
1) Get the fulfillment orders via GET /admin/api/2023-04/orders/{order_id}/fulfillment_orders.json

(as you've mentioned). You'll need to do this with an API key that has appropriate scopes. Hitting the endpoint from the browser will come up empty. If you're still not seeing fulfilment orders please DM me the order/store/app details and I'll investigate further.

 

2. Once you have the fulfillment order ID, you can create a fulfillment for the fulfillment orders.

curl -d '{"fulfillment":{"line_items_by_fulfillment_order":[{"fulfillment_order_id":FULFILLMENT_ORDER_ID_HERE}],"tracking_info":{"number":"MS1562678","url":"https://www.my-shipping-company.com?tracking_number=MS1562678"}}}' \
-X POST "https://store.myshopify.com/admin/api/2023-04/fulfillments.json" \
-H "X-Shopify-Access-Token: TOKEN HERE" \
-H "Content-Type: application/json"

 

Let me know how you go.

Scott | Developer Advocate @ Shopify 

LPAN012345
New Member
5 0 0
Hi,
I'm really sorry I've I'm just missing something silly, but I don't have any fulfilment orders - that's my issue.
See the top picture below, it shows my order 5445872681262. Then the bottom pic shows I don't get Fulfilment orders returned when I use the API call you recommended.
Cheers
Lee.
[cid:image001.png@01D9E7C0.5D781C30]
[cid:image002.png@01D9E7C0.5D781C30]
SBD_
Shopify Staff
1831 273 418

Hey Lee - can you please DM me store details?

Scott | Developer Advocate @ Shopify