How to create or update shopify fulfillments
Solution:
Here is the answer of the question this can help someone in the same case, actually I was using wrong fulfillment_order_id and location_number Before creating a fulfillment from above code we need to get the fulfillment_order_id from this API request https://'.API_KEY.':'.ACCESS_TOKEN.'@'.SHOP.'.myshopify.com'/admin/api/2022-10/orders/XXXXXXXXXXXXXX/fulfillment_orders.json this request will return the fulfillment_order_id inside the line_items node then use this id to create your fulfillment.
below API will return locations in case you need them https://'.API_KEY.':'.ACCESS_TOKEN.'@'.SHOP.'.myshopify.com'/admin/api/2022-10/locations.json
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.