I am trying to create a fulfilment through the REST API, it's not working.

javmah
Shopify Partner
2 0 0

I am trying to create a fulfillment through the REST API, but keep getting this response:

{

   "errors":{ "fulfillment":"Required parameter missing or invalid"}

}

could you please help me 



curl --location 'https://book.myshopify.com/admin/api/2023-04/fulfillments.json' \ --header 'X-Shopify-Access-Token: shpua_cb73***f23bb50cb93335dd9f' \ --header 'Content-Type: application/json' \ --data '{ "fulfillment": { "line_items_by_fulfillment_order": [ { "fulfillment_order_id": 5618584944961 } ], "tracking_info": { "number": "MS1562678", "url": "https://www.my-shipping-company.com?tracking_number=MS1562678" } } }'

 

Reply 1 (1)

Liam
Shopify Staff
2731 292 743

Hi Javmah,

 

The structure of the GET request you're making matches (apart from some stylistic differences) how the docs advise to create a fulfilment so it's tricky to see what might be causing this error. Some things I'd check would be to ensure that the `fulfillment_order_id` you're using is correct and corresponds to an existing, unfulfilled order in your Shopify account, as well as ensuring that the tracking number and URL are accurate.

 

Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog