Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

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

javmah
Shopify Partner
3 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
Community Manager
3108 344 894

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