TracksInventory field in GraphQL vs RestAPI

Solved
Shopify Partner
29 0 2

Hi folks,  I am curious if tracksInventory in GraphQL is carrying the same meaning as inventory_management in RestAPI.

 

 tracksInventory.png

0 Likes

Success.

Shopify Staff
Shopify Staff
135 22 26

Hi @samwise ,

 

These two fields are very similar but are not exactly the same.

 

For the "inventory_management" field for Product Variants in the REST API, it is used to report the fulfillment service that is tracking the inventory of this product variant. So this field will return "Shopify" if inventory is managed by Shopify, the handle of the fulfillment service if the product variant is being handled by a third party fulfillment service, or "null" if the inventory is not being tracked at all

 

For the "trackInventory" field for the Product in the GraphQL API, it is a boolean that returns true if the inventory tracking has been enabled for this product and false if the inventory tracking has not being enabled

 

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

0 Likes
Shopify Partner
29 0 2

@hassain thanks so much! Is there a plan to have a similar "trackInventory" in RestAPI?  

0 Likes
Highlighted
Shopify Staff
Shopify Staff
135 22 26

Hi @samwise ,

 

As far as I am aware there are no plans to add this field to the REST Admin API, but you can always keep an eye out on our API Changelog to see if this or another similar feature get added in: https://developers.shopify.com/changelog

 

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

0 Likes