Migrate API 2022-04 To 2022-07

Roman19
Shopify Partner
5 0 2

OLD API call:

 

 

/orders/{order_id}/fulfillments/{fulfillment_id}/complete.json

 

 

To migrate to version 2022-07, we need to abandon this method. How to get an fulfillment order by fulfillment ID? Without it, we will not be able to complete existing fulfillments

Replies 8 (8)

RobZone
Shopify Staff
69 10 22

The call to create the fulfillment for the fulfillment order achieves the same operation.  Fulfillments with a PENDING and OPEN status no longer exist once you move to fulfillment orders.

To learn more visit the Shopify Help Center or the Community Blog.

Roman19
Shopify Partner
5 0 2

The question is not how to work with the new version of the api. In version 2022-04, when clicked Request fulfillment in the Shopify, the service received the fulfillments/create webhook, and a fulfillment order was created from it in our service. The question is how to process these fulfillments when switching to a new version of the API if there is no fulfillment order ID for them

RobZone
Shopify Staff
69 10 22

A call to the assigned_fulfillment_orders endpoint will return the fulfillment orders assigned to your fulfillment service.

Requesting a fulfillment in the old API would trigger a creation of a PENDING fulfillment resource, that is probably why the fulfillments/create webhook is sent.  I think you want to subscribe to the fulfillment_orders/fulfillment_request_submitted webhook if you just want to know when the merchant has clicked request fulfillment.

To learn more visit the Shopify Help Center or the Community Blog.

Roman19
Shopify Partner
5 0 2

I give an example of use: 

1. The merchant receives an order in their Shopify store
2. The merchant clicks the "Request fulfillment" button and "Send fulfillment request" button
3. Our system receives FulfillmentOrder and saves it to our database
4. Our App accepts this FulfillmentRequest
5. So the FulfillmentRequest is "accepted", but after that, the Merchant clicks the "Fulfill items" button
6. After that we get a "fulfillments/create" webhook. But this webhook doesn't contain information about FulfillmentOrder

How can we understand in our system that the merchant fulfilled this FulfillmentOrder himself and we don't need to fulfill this order?
Please note that we want to use version 2022-07 and we don't have webhooks for FulfillmentOrder

RobZone
Shopify Staff
69 10 22

@Roman19 A fulfillment in progress does not display a "Fulfill items" button.  A merchant can only fulfill it themselves if the fulfillment order is moved to a merchant managed location.  If you are experiencing otherwise, you can send me a DM with the URL of the order and I will take a look at  your example.

The GraphQL API contains a connection between fulfillments and fulfillment orders if you need this.  Unfortunately, this will not be made available in the REST API.

 

Also, several fulfillment order webhooks were added to API version 2023-01.  

To learn more visit the Shopify Help Center or the Community Blog.

Roman19
Shopify Partner
5 0 2

@RobZone  

order.png

alex361
Shopify Partner
2 0 0

Hey Rob, so considering the steps described in the Roman's reply, is the answer we can't easily do it with 2022-07 version?

alex361
Shopify Partner
2 0 0

it doesn't work for me as well - I receive Fulfillment as Success, but how can I get FulfillmentOrder having only this Fulfillment?