[Updated Deadline] Breaking changes to Product/Variant, Fulfillment, and Refund APIs

Shopify Staff
Shopify Staff
277 1 52

UPDATE JAN 2: 

https://ecommerce.shopify.com/c/api-announcements/t/deadline-reminder-important-changes-to-productva...

UPDATE SEP 14

Hey Devs!

We've recently shipped a new change to help with identifying calls that we consider deprecated.  We've added a new header to return on these calls:

X-Shopify-API-Deprecated-Reason

If you receive one of these headers in your response, this means Shopify considers that a deprecated call.  This is an effort to allow these calls to be machine readable, and loggable, in order to assist developers in identifying the areas that need to be updated.

Examples of calls that will return this header:

  • Creating a fulfillment without a location
  • Creating a product with variants that have "inventory_quantity"
  • Creating a new variant on a product that has "inventory_quantity"
  • Updating a variant with "inventory_quantity_adjustment"
  • Updating a variant with "inventory_quantity"

 

Happy Coding!

 

At this year’s Unite we announced Locations, which enables merchants to manage inventory, fulfillments, and restocks across multiple locations from the admin. In anticipation of this release, we asked affected partners to migrate their apps to the set of APIs that support Locations and multi-location inventory workflows. In response to requests to extend the deadline, we are pushing it back one final time.

Thus, the following breaking changes will go into effect for apps on August 1, 2018 with some important conditions described below:

Product/Variant API

  • product_variant.inventory_quantity will be read only and return the total available quantity of inventory across all locations. Setting product_variant.inventory_quantity is considered a deprecated action and unsupported.  

  • product_variant.inventory_quantity_adjustment will be removed from the API. Setting product_variant.inventory_quantity_adjustment is considered a deprecated action and unsupported. 

  • product_variant.old_quantity_adjustment will be removed from the API. Setting product_variant.old_inventory_quantity is considered a deprecated action and unsupported. 

Fulfillment API

  • When creating a fulfillment, an app must specify the location from which the item is fulfilled using location_id. Failing to specify a location_id when creating fulfillments is considered a deprecated action and unsupported.

Refund API

  • To create a new refund and restock the item, an app must specify the location where they want to restock the item using location_id and restock_type. Failing to specify location_id and restock_type and/or using the global restock flag when creating refunds/restocks is considered a deprecated action and unsupported.

 

Mitigating risk to your merchants

After August 1, 2018, apps that continue to perform any of the above deprecated actions are at high risk of breaking workflows for their users.

To mitigate these risks, Shopify is taking the following steps:

Removal from Shopify App Store

Apps using the above deprecated actions after August 1, 2018 will be removed from the Shopify App Store.

Admin warning banners

If a merchant has enabled Locations and attempts to install an app that is using deprecated actions, Shopify will raise a warning during OAuth that the app is incompatible with Locations. Additionally, once a merchant attempts to enable Locations via their admin, Shopify will raise a warning of any installed apps or private apps that are incompatible with Locations. Lastly, Shopify will surface similar warnings on the Apps, Locations, and Inventory History pages.


Migrate to the new Inventory API today

For details on updating your app to the new Inventory API, see our Multi-Location Inventory Migration Guide.

 

If you have any questions or need further clarification, please comment in the thread below.

 

2 Likes
Shopify Partner
72 0 14

Impressed as hell with how y'all handle the evolution of your own platform, with particular mind for all these external surfaces. Awesome. :D

I made Locksmith and Mechanic. :)
0 Likes
Tourist
11 0 8

Hi, 

Does this mean Locations is being pushed back to August for public release or is it still very soon (coming week).

 

0 Likes
Shopify Partner
72 0 14

Impressed as hell with how y'all handle the evolution of your own platform, with particular mind for all these external surfaces. Awesome. :D

I made Locksmith and Mechanic. :)
0 Likes
Excursionist
22 0 5

There appears to be an issue with orders that are routed to multiple locations. In Shopify, a single order with multiple items can have the items routed to two or more locations. The Shopify UI displays which items are routed to which location.

However in the API, the location_id is only listed on the Order level. The line_items have no location_id field.

How can we tell if a single item should be split across multiple locations using this new functionality? It seems as though a location_id field should be added to the line_items element.

1 Like
Tourist
11 0 8

How can you see the UI? Is there a way we can activate to try this on a dev store?

0 Likes

Hi Jordan,

We have an app, EZ Inventory, that was using the `variant.inventory_quantity` to update the quantity when we first launched the app.  We've made the update a couple weeks back to use the new Inventory endpoints and added support for multi-location.

However, when I visit our test store that has multi-location enabled, we're still getting this message in the App page in the Shopify admin:

Some apps can't edit inventory quantities for more than 1 location
Outdated apps:
Developer Tools
EZ Inventory - Stage
EZ Inventory by Highview Apps
If you keep using these apps, inventory quantities in Shopify may become inaccurate. Shopify has notified them about this problem.

Learn more about outdated apps.

How does Shopify determine this? If you look at our API requests the last couple of weeks they should show that we've been using the new endpoints with the location_id to update the quantities.  Is there some setting we could be missing?

Thanks in advance!

Co-Founder / Developer at Highview Apps
Our Shopify Apps: apps.shopify.com/partners/highview-apps
0 Likes
Shopify Staff
Shopify Staff
277 1 52

However in the API, the location_id is only listed on the Order level. The line_items have no location_id field.

order.location_id only shows for POS created orders. So, if the order is created through POS, that location_id will be the POS location. Otherwise, it will be always be null since we don't yet support scoping locations to any other channels (i.e online store, API created orders, sales channels).

How can we tell if a single item should be split across multiple locations using this new functionality? It seems as though a location_id field should be added to the line_items element.

May I ask what location you would expect to be exposed on the line item?

How can you see the UI? Is there a way we can activate to try this on a dev store?

There definitely is! See the beta setup instructions at the bottom of the announcement here.

0 Likes
Shopify Staff
Shopify Staff
277 1 52

Hey Jonathan, 

We are currently tracking which apps have migrated to the new APIs and that warning is surfaced from a list of apps that haven't yet migrated.

It will be updated every 24-48 hours starting early next week. If you've updated your app, the warning will disappear. 

0 Likes

Great, will keep an eye on it. Thanks for the info!

Co-Founder / Developer at Highview Apps
Our Shopify Apps: apps.shopify.com/partners/highview-apps
0 Likes