Hi
We were migrating our project to the new fulfillment workflow and has got few doubts regarding the same.
- We are retrieving the orders using the Admin API GET order.json end point. This endpoint response has got a ‘fulfillments’ array which is always empty for us. I initially thought we will get the fulfillment IDs from here. As a matter of fact I cannot find any fulfillment IDs in the order response.
https://shopify.dev/docs/api/admin-rest/2022-10/resources/order#post-orders
So in order to get the fulfillment IDs, I am firing the GET Fulfillment_orders Admin API separately for each order. Is that how we should do it?
- As per the documentation, Fulfillment IDs are created automatically when an order is placed. If that’s the case I don’t have to create the fulfillment IDs right?
3)How many Fulfillment IDs can be there for an order? We just got a single location ATM. All our orders are dispatched from our head office warehouse. So, does that mean i can expect the same fulfillment ID for all the lines in a particular order? If not, then what’s the condition for having multiple fulfillment IDs
So in a nutshell here is what we are going to do.
a) Call the Admin API get order to get all the orders.
b) From the response, extract the order IDs.
c) call the Admin API GET fulfillment_orders to get the fulfillment ID for each order.
d) As the fulfillment ID is same for all the lines in an order, extract the fulfillment ID of the first line_item and save it against the order in our DB.
e) Once we dispatch the order, call the /admin/api/2023-01/fulfillments.json POST to create the fulfillment.
4)Can we call the Fulfillment API on the Same Fulfillment ID with Different Line numbers if we are Dispatching the line_items separately ? Like post the fulfillment for the first 3 items from the same order and fulfillment ID first with the tracking details. Then call the API with same fulfillmentID and orderNo, but with the rest of the line nos and tracking details.
Sorry, I know the post is a but long But i just wanted to be 100% sure that We are following the correct approach.