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

Tourist
3 0 1

Thanks so much for the update. Another important question.

Setting product_variant.inventory_quantity is considered a deprecated action and unsupported.  

Can someone please take a look at the issue I opened on the rails shopify_api gem, https://github.com/Shopify/shopify_api/issues/454? Calling update_attribute or update_attributes on a product or variant active_resource object is going to pass inventory_quantity in as an argument, so I'm concerned that apps using the gem will get pulled if they are modifying products or variants in any way. There may be apps that aren't updating inventory that aren't realizing they may be impacted by this. I don't think there's an easy way to fix this in the gem, or get anyone using the gem to update it, so I'm hoping that as long as apps aren't trying to change the value on inventory_quantity they won't tigger warnings or get removed from the app store. For our apps right now, I don't know if I need to get off the gem.

- Shane

0 Likes
Excursionist
22 0 5

Can you confirm if these location changes are only for POS users? Will ecommerce only users just have a default location?

Also, can you please update the documentation to explain the setting screenshot below? This option says that orders can be routed by inventory to specific locations for fulfillment. In reality this feature appears to always assign ecommerce orders to the first location in the list.

0 Likes
Shopify Partner
5 0 2

Is it mandatory to use the new APIs, or we can use the old APIs if we don't enable the location?

Do we need to use the new Inventory Level API to update the inventory of the product/product variants? If yes, how can we find the location_id? Do we need to assign a location for each of the existing product/product variants, and then get the location ID from them when updating inventory?

I can't find any location under settings, tried by adding location in Point of Sales>Locataions, but location didn't come under settings. How to enable location?

The API documentation is not updated yet, and do not have the location_id in the request format(https://help.shopify.com/en/api/reference/shipping_and_fulfillment/fulfillment#update). How to send the location_id when fulfilling partially/fully?

0 Likes
Shopify Staff
Shopify Staff
277 1 52

Is it mandatory to use the new APIs, or we can use the old APIs if we don't enable the location?

Yes. Locations aside, you need to migrate away from the deprecated API/actions listed in the announcement above.

Do we need to use the new Inventory Level API to update the inventory of the product/product variants?

Every inventory item (tied to the variant) belongs to a Location today. We just released a new guide around updating inventory which should help clarify your questions. 

The API documentation is not updated yet, and do not have the location_id in the request 

You need to specify location_id on fulfillment create requests. 

0 Likes
New Member
2 0 0

As the user of our app only has one location for fulfillment, is it sufficient that we send this location_id along with our creation of a fulfillment?

 

import Shopify from 'shopify-api-node';
...
const shopify = new Shopify({
                        shopName: storeExists.storeName,
                        accessToken: storeExists.token,
                    });
...
shopify.fulfillment.create(shopifyOrder.id, {
                            location_id: 0123456789,
                            tracking_number: null,
                            line_items: line_items
                        })

 

0 Likes
Shopify Staff
Shopify Staff
469 36 92

Yes if they only have one location you just send that location_id.

Developer Experience @ Shopify
0 Likes
Shopify Partner
6 0 2

hello I have a question, when you send my location_id in my request, your api answers the following error:

response: 
{"errors":"Not Found"}

request:

{"fulfillment":{"location_id":516876140657,"tracking_number":"794613732806","tracking_company":"FEDEX","tracking_url":"http:\/\/www.fedex.com\/Tracking?tracknumbers=794613732806","line_items":[{"id":1356647596145,"quantity":1}]}}

0 Likes
Shopify Partner
9 0 3

Well, a 404 usually means that the endpoint of your request does not exist. Are you sure you're sending out this request to the correct endpoint? What URL are you using? 

It should be something like: 

POST /admin/orders/#{order_id}/fulfillments.json 

Note it is 'fulfillments' (so plural) => https://help.shopify.com/en/api/reference/shipping_and_fulfillment/fulfillment

Developer at CODE Internet Applications | Delft | The Netherlands
0 Likes
Shopify Staff
Shopify Staff
277 1 52

Hey Peter,

The Location (location_id) doesn't exist on that shop. 

0 Likes
Tourist
4 0 2

We're busy updating our apps from the legacy way of updating stock, to the new inventory resources.

Although, for shops who do not have the multi-location feature enabled, a 403 response will be returned (as stated in the API docs). With this being said - we can not utilise the /admin/inventory_levels/set endpoint. How is updating stock done for non-multi-location shops?

Sample request: {shop}.myshopify.com/admin/inventory_levels/set.json

{ "location_id": {location_id}, "inventory_item_id": {inventory_item_id}, "available": {integer} }

E: if multi-location is disabled, stock inventory can only be updated if the assigned location_id is the shipping origin

0 Likes