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.

Re: FulfillmentService - Callback URL

Solved

FulfillmentService - Callback URL

TLSclogs
Shopify Partner
4 0 1

Hello, 

We are a 3rd party warehouse that fulfills orders for several clients that manages their orders/inventory via Shopify. 

We are registered as a FulfillmentService location for one of clients on Shopify where we have our own backend processes that will call Shopify's endpoints to GET orders, GET Fulfillment Orders and POST to the Fulfillments Endpoints. 

I'm a bit puzzled by the below section from https://shopify.dev/docs/api/admin-rest/2023-04/resources/fulfillmentservice

 

From our perspective, we don't need to host the callback URL since we already have processes to call Shopify's endpoints to get orders and post fulfillments. Is this really mandatory or am I misunderstanding?

 

Shopify sends POST requests to the callback_url/fulfillment_order_notification endpoint to notify the fulfillment service about fulfillment requests and fulfillment cancellation requests, if fulfillment_orders_opt_in is set to true.
As of the 2022-07 API version, it's mandatory for a fulfillment service to follow a fulfillment order based workflow by having fulfillment_orders_opt_in set to true, hosting the callback_url/fulfillment_order_notification endpoint, and acting on fulfillment requests and cancellations.

Accepted Solution (1)

Michael_AG
Shopify Staff
47 8 11

This is an accepted solution.

Hi,

 

A few words about how the callback_url can be used: https://community.shopify.com/c/fulfillment-api-deprecation/fulfillment-service-app-is-callback-url-...

Based on community feedback like yours, we will make it optional (planned for development). For now, I personally can suggest you providing a fake url like smth.requestcatcher.com

 

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

View solution in original post

Replies 6 (6)

Dominik_
Shopify Partner
11 0 3

Hey, 

I'm also confused what the callback URL is about. 
To make things clear I'm not an Shopify Expert but I'm always trying to figure out the stuff on my own. 
But here I think I just don't get the full picture. 
Why do I need to communicate via a callback url with shopify? Why can I not just fulfill the orders like before by POST the information to the REST API (store + apiPath + 'orders/' + orderID + '/fulfillments.json') ? 
My questions are: 
- what is the benefit of the callback url ? 
- how can I define such a callback url ? 
- what features does this callback url need to fulfill to make it work ? 

We are a small shop and need this workflow for a custom app to automize our fulfillment and packing process. So no 3rd Party App, no other shops which are using our app. Just one shop with one inventory and one custom app. 

If anyone feels the call to explain me this topic I would be very very grateful! 🙏🏼

joejetta
Shopify Partner
1 0 0

I'm pretty much in the same boat too.  We have only shopify online sales, one warehouse that fulfills the orders and not much of a need for a callback process.

Michael_AG
Shopify Staff
47 8 11

This is an accepted solution.

Hi,

 

A few words about how the callback_url can be used: https://community.shopify.com/c/fulfillment-api-deprecation/fulfillment-service-app-is-callback-url-...

Based on community feedback like yours, we will make it optional (planned for development). For now, I personally can suggest you providing a fake url like smth.requestcatcher.com

 

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

Dominik_
Shopify Partner
11 0 3

Any Idea why I get this error {"errors":{"fulfillment_service":"Required parameter missing or invalid"}}?

There are no required parameter for creating a new fulfillment service or am I wrong ? 

var headers = {
'X-Shopify-Access-Token': token,
'Content-Type': 'application/json'
};
var options = {
"method" : "POST",
"headers" : headers,
"fulfillment_service":{
"name": "Fulfillment Service 05/23",
"inventory_management": true,
"tracking_support": true,
"requires_shipping_method":false,
"format":"json",
"permits_sku_sharing":true,
"fulfillment_orders_opt_in":true,
},
};
var url = store + "admin/api/2023-04/fulfillment_services.json"
var response = UrlFetchApp.fetch(url, options);
var jsResp = JSON.parse(response.getContentText());
}

Happy for every help! 
Michael_AG
Shopify Staff
47 8 11

Hi,

 

name, response_format, callback_url, fulfillment_orders_opt_in are required parameters. I'll check why they are not marked as required in the docs, thanks for letting us know.

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

Dominik_
Shopify Partner
11 0 3

Hey Michael, 

It's still not marked as required and there is also no response_format mentioned in the doc. 
Can you give me an example what formats are valid? 

Thanks a lot