Shopify Locations: What This Update Means for App Developers

Shopify Locations: What This Update Means for App Developers

At this year’s Unite, Shopify introduced a fundamental new concept, and the workflows surrounding it: Locations, To enable Shopify Developers to update current apps or create new apps around this concept, we’ve made important updates to various APIs, and introduced new Inventory APIs.


To evolve with the many sales and fulfillment needs of merchants, Shopify has put a lot of effort into adding location awareness to many core areas, including inventory, fulfillment, transfers, refunds, and more. With these changes to our platform, Shopify’s ‘back office’ capabilities are getting a much needed upgrade to better support our merchants’ growing needs, and the API updates will allow developers to build new and innovative solutions.

In this blog post, we’ll walk you through what this update means for Shopify Developers, and the necessary changes you need to make to your apps to better support your merchants with multiple locations.

You might also like: How the New GraphQL Admin API Can Help You Manage Inventory and Locations.

How APIs around locations have evolved

shopify locations developer api avilability

Over the past 10 years, Shopify has grown with our merchants and developers in ways we couldn’t have predicted.

In the beginning, Shopify was designed for merchants with very simple inventory needs. Many of our merchants started their businesses fulfilling inventory from one place, such as a basement or garage. Because of this, the solutions available were also very simple.

In 2013, Shopify introduced Locations in the form of our Point of Sale product. At that time, locations were only connected to orders. This helped keep track of the specific retail location where an order was placed.

In 2018, we updated the concept of Locations. The easiest way to think about a “location” is any place where a merchant does business. It can have an address, it can store inventory, it can ship items, or it can make sales.

With this concept of Locations, instead of seeing a single number that represents all of a merchant’s inventory for a specific product, Shopify merchants will be able to manage their inventory per location, for the first time ever.

You might also like: Introducing Shopify Developer Tools for macOS.

Reaching new merchants and enhancing your app with Locations

shopify locations developer admin

Locations provide a dedicated home for fulfillment apps, custom fulfillment services, dropshipping apps, print-on-demand apps, and third-party logistic apps. They also represent all the physical places from which orders are being fulfilled.

In this space, apps can help merchants manage items at one or more locations, and provide better visibility and control over inventory management. Apps can specify where items are being stocked, fulfilled, or returned.

The first step to creating new solutions that fit into Locations is to trial the beta.

Not yet a Shopify Partner and want to test out our newest tools and updates? Sign up for a Shopify Partner account now to access a free development store.

Exploring Locations on your development stores

It’s important to note that Locations is currently in beta, and can only be accessed through development stores. The only requirement to access Locations is your Shopify Partner account.

How to enable Locations on your development stores

  1. Create a new development store
  2. Toggle the Enable Locations beta checkbox when creating your development store
  3. From the Shopify Admin, go to Settings > Locations
  4. In the Locations section, click Enable Locations

You’re all set! You can now begin beta testing Locations on your development store. For more information on how to use these features, see our beta Locations documentation.

In addition, once you enable Locations on your development store, the account owner of the development store will receive an email from TestFlight within 24-48 hours with set up instructions for testing POS with new location features.

Enhancing your locations-related apps, and preventing breaking during API migration

With the introduction of Locations, we’re making changes to three existing APIs:

We are also introducing two new Inventory APIs:

If you're currently using one of the existing APIs, you've likely already received migration instructions (a few times!) through email or the API Announcement forums. If you're too swamped to do a scan of your inbox, we've also included migration details below.

Important: These updates should be prioritized—as of August 1, 2018, apps will no longer be able to use the Product and Variant API to adjust inventory. Additionally, fulfillments and refunds with restocks will require a location_id at creation.

Product and Variant APIs

Wherever a merchant’s items are stocked—in a warehouse, at a retail store, at a dropshipper, or a fulfillment center—we want to know about it. To make this possible, we’ve introduced two new concepts to our platform: Inventory Item and Inventory Level.

Behind the scenes, each variant is now always linked to a single InventoryItem. Each InventoryItem must be stored in at least one location at any given time. Inventory stored in each location is represented by the new InventoryLevel resource.

shopify locations developer api relationships
Inventory API resource relationships.

In the past, each variant had a single quantity that was visible in Shopify, and apps would update this quantity directly on the variant. Going forward, that same quantity will be a representation of all available inventory across all locations.

However, the Product and Variant APIs should continue to be used for merchandising concerns, such as:

  • How will items be priced?
  • What product images should customers see?
  • What sales channels is this item sold on?
  • What description should customers see?

The new Inventory APIs (which uses the InventoryItem and InventoryLevel resources above) should be used when dealing with the back-office concerns of physical goods, such as:

  • Where are the items stored?
  • How many of a particular SKU are in the warehouse vs the retail store?
  • How much does an item weigh?

Access Inventory migration guide

Fulfillment API

The Fulfillment API allows your app to tell Shopify when items have been picked and packed, but it now has been updated to include where that fulfillment took place as well. Each fulfillment in Shopify must now reference a location_id, representing the location in which the goods were processed.

Apps should create multiple independent fulfillments when:

  • Items are processed and shipped from different locations
  • Items are processed at different times
  • Items are delivered to the customer with different shipping providers

Here is an example of a fulfillment request specifying location_id.

 

Access Fulfillment migration guide

Refund API

The Refund API allows apps to do the following:

  • Process refund payments
  • Restock items to inventory
  • Notify customers about the changes made to their orders when Refunds are processed

Prior to supporting Locations, restocking was an all-or-nothing operation––that is, all items on a given refund were restocked, or none were. We have updated the Refunds API to allow more flexibility.

Here is an example return. As you can see, you can specify precisely which location to restock each item to.

 

Access Refund API

Help us build the multi-location future of commerce

This update will provide additional value to merchants and app Partners of all sizes, granting all merchants the ability to track inventory across multiple locations, and apps to help them do so efficiently. No more duplicate products, and no more spreadsheets.

What do you think of Locations? Share your thoughts in the comments below!

About the Author

Daria Kourilina is a senior product manager at Shopify, where she spends her time leading teams that work on logistics, inventory, fulfillment, and order management. Prior to joining Shopify, Daria was diagnosed with the travel bug, and traveled around the world for 12 months. When she’s not building products or traveling, you can find her upside down at yoga or tasting smelly cheese!

Grow your business with the Shopify Partner Program

Learn more