I am using the shopify plus and going to migrate the shopify fulfillment api from 2022-4 to 2023-4.
I know that I should migrate from Shopify Fulfillment api to FulfillmentOrder api until June 30, 2023.
I am using the Shopify gem in my app (Ruby) and Fulfillment api is used like this way.
How can I configure tracking info for fulfillment using the FulfillmentOrder API?
Thanks for the reply.
But in 2023-4 api version, the endpoint /orders/{order_id}/fulfillments.json is already removed so I can’t save the fulfillment using the order_id.
It recommends to use the FulfillmentOrder instead of Fulfillment Resource.
Now you will likely need to use the order id to fetch all the fulfillmentOrders
fulillment_orders = ShopifyAPI::FulfillmentOrder.all(order_id: order_id)
fulfillment = ShopifyAPI::Fulfillment.new(session: test_session)
# This would fulfill all but you can filter out the ones you want
fulfillment.line_items_by_fulfillment_order = fulfillment_orders.map {|fo| { 'fulfillment_order_id' => fo.id } }
fulfillment.tracking_info = {
"number" => "MS1562678",
"url" => "https://www.my-shipping-company.com?tracking_number=MS1562678"
}
fulfillment.save!
you might also need an extra step if you only want to fulfill certain items within a fulfillment order