Covers all questions related to inventory management, order fulfillment, and shipping.
Hi folks, I am curious if tracksInventory in GraphQL is carrying the same meaning as inventory_management in RestAPI.
Solved! Go to the solution
This is an accepted solution.
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
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
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
To learn more visit the Shopify Help Center or the Community Blog.
@hassain thanks so much! Is there a plan to have a similar "trackInventory" in RestAPI?
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
To learn more visit the Shopify Help Center or the Community Blog.
Looks like things changed again. `trackInventory` is no longer part of the the ProductVariant.
However, I believe you can use `inventoryItem` instead
inventoryItem {
inventoryHistoryUrl
}