How to add new FulfillmentService for app to create Location for products?

Shopify Partner
23 3 0

I am testing a Shopify Fulfillment App that should be taking in orders and fulfilling their line items. In Shopify when creating a product, you can connect a Fulfillment Service to either the Product itself (if alone) or the variants individually; this is the goal.


On installation (I have also tried this after installation), I tried the following:


    fulfillment_service =
name: "name",
handle: "name",
callback_url: '',
inventory_management: true,
: true,
requires_shipping_method: true,
response_format: "json" )

The error: ActiveResource::ResourceInvalid (Failed.)


Apparently, you don't need a callback_url if you aren't checking for inventory, which we are not, so trying:


    fulfillment_service = 
: "name",
: "name",
: false,
tracking_support: false,
requires_shipping_method: false,
response_format: "json" )

Got me the same error.


This is all being done under a shopify_session so that isn't the issue.

Also, Shopify won't give me actual errors. I figured adding the bang! would give me some since it does on other Shopify API calls.


To clarify just in case there is confusion, we are able to send Fulfillment requests and fulfilling an order or line_item successfully but we want to set a location. Without setting a location, you cannot specify the FulfillmentService per product or line_item and according to Shopify, this is required in the updates for apps that are on the marketplace that make fulfillments in any capacity --- which this app is a Fulfillment App.


The app technically works how I want but I want to abide by Shopify's rules. I currently have Order webhooks for create and update and I then send back the tracking through the fulfillment API request for the line items. Although, I believe, from my understanding and reading, that if you fulfill items, you need to add a location and all fulfillment apps are now doing this.


Other Apps:

I tested installing other fulfillment apps and it works for their install process. Some create FulfillmentService, which then automatically makes a Location for the App, on install and some wait after signup.

Then you will see the app in Locations under "App Locations".


My question is, what am I doing wrong here?


How do I make the FulfillmentService?


The goal for the app is to basically be a fulfillment service of actual products. Like a warehouse. So we will take the order, then the line_items, fulfill them, send back the tracking.

Shopify Staff
Shopify Staff
587 72 131

Hey @brandnamewater,


It sounds like you're on the right track, so we'll need to investigate a bit more to see why your call to create a FulfillmentService is failing.


Can you kindly provide the X-Shopify-Request-ID value from the response headers of your call which attempts to create the FulfillmentService?


Also, please confirm which permissions your app requests during install.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution