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

Shopify Partner
4 0 0

@Aleks this is helpful, thank you!

0 Likes
New Member
10 0 0

@Matt no problem! :)

0 Likes
Shopify Staff
Shopify Staff
277 1 52

Team, quick update: 

Shopify Locations: the opt-in merchant feature that enables shop owners to set up multiple locations in their Shopify store so that they can track inventory, fulfill orders, and restock items at their locations has not yet launched. I don't have an exact launch date, but we expect to begin rolling it out soon. 

However, you still need to update your apps to use the new Inventory APIs (that have been available since February) immediately. The August 1, 2018 deadline was set so apps were using the new APIs (and ideally updated to support multi-location inventory workflows) in time for Shopify Locations.  

- Manage inventory using Inventory API (inventory levels, inventory items, and locations resources)

- Fulfill orders speciying location_id

- Restock items using location_id and restock_type

In order to preserve inventory accuracy, you must use these new APIs regardless of whether a shop owner has a single location (today) or has multiple locations (in the near future).

 

 

 

 

 

 

0 Likes
New Member
1 0 0

We upgraded our app to use the new API code. Before the August 1st deadline. We are using the Shopify Python API 3.1.0 latest release, everything was fine before August 1st deadline. We asked Shopify Support to upgrade all our current users to our new scope requirements and our users upgraded their aps to the new version of our app that uses this new API.
But since a few days we are getting calls from our users that syncing doesn't seem to work anymore. And they are getting these errors:
 

ForbiddenAccess: Response(code=403, body="{"errors":["Shop does not have multi-location enabled"]}", headers={'x-sorting-hat-section': 'pod', 'vary': 'Accept-Encoding, Accept-Encoding', 'x-shopify-shop-api-call-limit': '1/40', 'x-shopid': '7036603', 'x-sorting-hat-privacylevel': 'default', 'http_x_shopify_shop_api_call_limit': '1/40', 'x-sorting-hat-shopid-cached': '1', 

So when our users revert their apps back to old version using the old Shopify API for inventory, everything is working fine.

The way we are setting the inventory (new API) is by using the following call:        

shopify.InventoryLevel.set(location.id, inventory_item_id, quantity)

So we are confused now? why is the new API not working anymore, also why is the old API still working? wasn't this supposed to be disabled by now?

Update:

I figured out how this can happen, some stores, have this in their profile:

"multi_location_enabled":false,
  1. But when you look at their locations, some of these stores had more then one location assigned, not sure how this can can happen because multi-location wasn't available to them....
  2. and in the case our app picked a default location for that store (let's say the oldest location ID) but that location is then different that is assigned to the product already. 
  3. You get above error.

I contacted support to explain and report the problem.
 

0 Likes
Shopify Staff
Shopify Staff
469 36 92

Shops can have more than one location with Shopify POS.  The 403 forbidden you are receiving is because you are trying to perform an action that requires the shop to have the feature enabled.  Generally this would be trying to stock inventory in a location that does not already have it stocked.  I would ensure the location_id you are passing is the location where the inventory is stocked.

Developer Experience @ Shopify
0 Likes
Shopify Partner
26 0 8

Hi Ryan,

I have an app which exports orders to an carrier and fulfills them.

Reading the migration guide, this now requires two extra calls required and if we assume an average of 5x items per order, thats a 10 extra API calls required to fulfil an order.

If a store has 1000 orders a day, and assuming 5x line items per order, thats up to 10000 additional API calls required (rather than the current 4 to retrieve 1000 orders). It's not very sustainable if you take into account the API call limit too.

There has to be a better way right?

0 Likes
Shopify Partner
26 0 8

There is a corner case here. If a customer purchases a product (say PRODUCT A) and the order is unfulfilled, i can still delete the product. Once deleted, there is no way of looking up where that product inventory is located as it no longer exists. In such cases which location id do we use to fulfil the product? is it the default one?

Also. How do we retrieve the preferred ordering of the fulfillment locations? This can be defined in the Shopify settings but doesn't seem to be retrievable via the API.

0 Likes
Excursionist
22 0 5

@ParcelIntelligence, I was told by a Shopify technical contact that the preferred fulfillment locations does not work yet. We have performed testing on that feature and found the same thing. Unfortunately no one at Shopify seems to be able to explain how or when it will work.

0 Likes
Shopify Staff
Shopify Staff
469 36 92

If you are having issues with the API call limit I would look into both the Admin GraphQL API, and caching/storing some of the information locally so you don't have to make a call each time.

Developer Experience @ Shopify
0 Likes
Shopify Staff
Shopify Staff
469 36 92

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!

Developer Experience @ Shopify
0 Likes