Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

Programmatically releasing and order to a fulfilment service

Geordie_ca
Tourist
7 1 1

Hi,

 

I'm trying to convert our integration to the new fulfilment service model.  I have been able to figure out how to automate all the steps in the fulfilment process, except the step where the user clicks the 'Request Fulfilment' button.

 

Geordie_ca_0-1676484004934.png

 

I have tried to use the 'fulfillmentOrderSubmitFulfillmentRequest' API as the description fits what I want to do.

'Sends a fulfillment request to the fulfillment service of a fulfillment order.'

 

But I get a 'Fulfillment order does not exist' error. when I try to pass the order ID as 

"gid://shopify/FulfillmentOrder/4574488985684" or an 'Invalid ID' if I use 
"gid://shopify/Order/4574488985684".
 
I also looked at the order APIs and could not find an API that looked like it would initiate the fulfilment service process.
 
Any help would be much appreciated.
Reply 1 (1)

Geordie_ca
Tourist
7 1 1

I think I have this figured out.  If I use the 'Get Order By ID' API , the system can return a fulfilment ID, that I can then use to call the fulfilment API's in the fulfilment process. 

 

In fact I just checked and using this API, I can by pass the whole callback and accept fulfillment process steps and go straight to 'FulfilmentCreateV2' API and mark the order as Fulfilled and collect payment.